IMessageReceiver Interface

Definition

Defines message receiver interface. The MessageReceiver can be used to receive messages from Queues and Subscriptions and acknowledge them.

public interface IMessageReceiver extends IMessageEntityClient, IMessageBrowser
Implements

Methods

abandon(UUID lockToken)

Abandon Message with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message

abandon(UUID lockToken, TransactionContext transaction)

Abandon Message with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message

abandon(UUID lockToken, Map<String,Object> propertiesToModify)

Abandon Message with lock token and updated message property. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message

abandon(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)

Abandon Message with lock token and updated message property. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message

abandonAsync(UUID lockToken)

Asynchronously abandon Message with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message.

abandonAsync(UUID lockToken, TransactionContext transaction)

Asynchronously abandon Message with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message.

abandonAsync(UUID lockToken, Map<String,Object> propertiesToModify)

Asynchronously abandon Message with lock token and updated message property. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message.

abandonAsync(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)

Asynchronously abandon Message with lock token and updated message property. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message.

complete(UUID lockToken)

Completes a Message using its lock token. This will delete the message from the service.

complete(UUID lockToken, TransactionContext transaction)

Completes a Message using its lock token. This will delete the message from the service.

completeAsync(UUID lockToken)

Asynchronously completes a Message using its lock token. This will delete the message from the service.

completeAsync(UUID lockToken, TransactionContext transaction)

Asynchronously completes a Message using its lock token. This will delete the message from the service.

deadLetter(UUID lockToken)

Moves a Message to the deadletter sub-queue.

deadLetter(UUID lockToken, TransactionContext transaction)

Moves a Message to the deadletter sub-queue.

deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription)

Moves a Message to the deadletter sub-queue with deadletter reason and error description.

deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, TransactionContext transaction)

Moves a Message to the deadletter sub-queue with deadletter reason and error description.

deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String,Object> propertiesToModify)

Moves a Message to the deadletter sub-queue with deadletter reason and error description and modified properties.

deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String,Object> propertiesToModify, TransactionContext transaction)

Moves a Message to the deadletter sub-queue with deadletter reason and error description and modified properties.

deadLetter(UUID lockToken, Map<String,Object> propertiesToModify)

Moves a Message to the deadletter sub-queue with modified message properties.

deadLetter(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)

Moves a Message to the deadletter sub-queue with modified message properties.

deadLetterAsync(UUID lockToken)

Asynchronously moves a Message to the deadletter sub-queue with deadletter.

deadLetterAsync(UUID lockToken, TransactionContext transaction)

Asynchronously moves a Message to the deadletter sub-queue with deadletter.

deadLetterAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription)

Asynchronously moves a Message to the deadletter sub-queue with deadletter reason and error description.

deadLetterAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, TransactionContext transaction)

Asynchronously moves a Message to the deadletter sub-queue with deadletter reason and error description.

deadLetterAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String,Object> propertiesToModify)

Asynchronously moves a Message to the deadletter sub-queue with deadletter reason and error description and modified properties.

deadLetterAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String,Object> propertiesToModify, TransactionContext transaction)

Asynchronously moves a Message to the deadletter sub-queue with deadletter reason and error description and modified properties.

deadLetterAsync(UUID lockToken, Map<String,Object> propertiesToModify)

Asynchronously moves a Message to the deadletter sub-queue with modified properties.

deadLetterAsync(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)

Asynchronously moves a Message to the deadletter sub-queue with modified properties.

defer(UUID lockToken)

Defers a Message using its lock token. This will move message into deferred subqueue.

defer(UUID lockToken, TransactionContext transaction)

Defers a Message using its lock token. This will move message into deferred subqueue.

defer(UUID lockToken, Map<String,Object> propertiesToModify)

Defers a Message using its lock token with modified message property. This will move message into deferred subqueue.

defer(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)

Defers a Message using its lock token with modified message property. This will move message into deferred subqueue.

deferAsync(UUID lockToken)

Asynchronously defers a Message using its lock token. This will move message into deferred subqueue.

deferAsync(UUID lockToken, TransactionContext transaction)

Asynchronously defers a Message using its lock token. This will move message into deferred subqueue.

deferAsync(UUID lockToken, Map<String,Object> propertiesToModify)

Asynchronously defers a Message using its lock token with modified message propert. This will move message into deferred subqueue.

deferAsync(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)

Asynchronously defers a Message using its lock token with modified message propert. This will move message into deferred subqueue.

getPrefetchCount()

Get the prefetch value set.

getReceiveMode()

Get current receiver's ReceiveMode.

receive()

Receives a Message with default server wait time.

receive(Duration serverWaitTime)

Receives a Message with specified server wait time.

receiveAsync()

Receives a Message from Azure Service Bus.

receiveAsync(Duration serverWaitTime)

Receives a Message from Azure Service Bus with server wait time.

receiveBatch(int maxMessageCount)

Receives a maximum of maxMessageCount Message from Azure Service Bus.

receiveBatch(int maxMessageCount, Duration serverWaitTime)

Receives a maximum of maxMessageCount Message from Azure Service Bus with server wait time.

receiveBatchAsync(int maxMessageCount)

Asynchronously receives a maximum of maxMessageCount Message from the entity.

receiveBatchAsync(int maxMessageCount, Duration serverWaitTime)

Asynchronously receives a maximum of maxMessageCount Message from Azure Service Bus with server wait time.

receiveDeferredMessage(long sequenceNumber)

Receives a deferred Message. Deferred messages can only be received by using sequence number.

receiveDeferredMessageAsync(long sequenceNumber)

Asynchronously receives a specific deferred Message identified by sequence number.

receiveDeferredMessageBatch(Collection<Long> sequenceNumbers)

Receives a batch of deferred Message.

receiveDeferredMessageBatchAsync(Collection<Long> sequenceNumbers)

Asynchronously receives a set of deferred Message from the entity.

renewMessageLock(IMessage message)

Renews the lock on the message specified by the lock token. The lock will be renewed based on the setting specified on the entity. When a message is received in PEEKLOCK mode, the message is locked on the server for this receiver instance for a duration as specified during the Queue/Subscription creation (LockDuration). If processing of the message requires longer than this duration, the lock needs to be renewed. For each renewal, the lock is reset to the entity's LockDuration value.

renewMessageLock(UUID lockToken)

Renews the lock on the message specified by the lock token. The lock will be renewed based on the setting specified on the entity. When a message is received in PEEKLOCK mode, the message is locked on the server for this receiver instance for a duration as specified during the Queue/Subscription creation (LockDuration). If processing of the message requires longer than this duration, the lock needs to be renewed. For each renewal, the lock is reset to the entity's LockDuration value. Note - calling this will not update getLockedUntilUtc() and updated lockedUntilUtc must be tracked by the application.

renewMessageLockAsync(IMessage message)

Asynchronously renews the lock on the message specified by the lock token. The lock will be renewed based on the setting specified on the entity. When a message is received in PEEKLOCK mode, the message is locked on the server for this receiver instance for a duration as specified during the Queue/Subscription creation (LockDuration). If processing of the message requires longer than this duration, the lock needs to be renewed. For each renewal, the lock is reset to the entity's LockDuration value.

renewMessageLockAsync(UUID lockToken)

Renews the lock on the message specified by the lock token. The lock will be renewed based on the setting specified on the entity. When a message is received in PEEKLOCK mode, the message is locked on the server for this receiver instance for a duration as specified during the Queue/Subscription creation (LockDuration). If processing of the message requires longer than this duration, the lock needs to be renewed. For each renewal, the lock is reset to the entity's LockDuration value. Note - calling this will not update getLockedUntilUtc() and updated lockedUntilUtc must be tracked by the application.

setPrefetchCount(int prefetchCount)

Set the prefetch count of the receiver. Prefetch speeds up the message flow by aiming to have a message readily available for local retrieval when and before the application asks for one using Receive. Setting a non-zero value prefetches PrefetchCount number of messages. Setting the value to zero turns prefetch off. For both PEEKLOCK mode and RECEIVEANDDELETE mode, the default value is 0.

The value cannot be set until the receiver is created.

Applies to