Package com.microsoft.azure.servicebus
Class MessageSession
- java.lang.Object
-
- com.microsoft.azure.servicebus.primitives.ClientEntity
-
- com.microsoft.azure.servicebus.MessageSession
-
- All Implemented Interfaces:
ICloseable
,IMessageBrowser
,IMessageEntityClient
,IMessageReceiver
,IMessageSession
public class MessageSession extends ClientEntity implements IMessageSession
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abandon(UUID lockToken)
AbandonMessage
with lock token.void
abandon(UUID lockToken, TransactionContext transaction)
AbandonMessage
with lock token.void
abandon(UUID lockToken, Map<String,Object> propertiesToModify)
AbandonMessage
with lock token and updated message property.void
abandon(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)
AbandonMessage
with lock token and updated message property.CompletableFuture<Void>
abandonAsync(UUID lockToken)
Asynchronously abandonMessage
with lock token.CompletableFuture<Void>
abandonAsync(UUID lockToken, TransactionContext transaction)
Asynchronously abandonMessage
with lock token.CompletableFuture<Void>
abandonAsync(UUID lockToken, Map<String,Object> propertiesToModify)
Asynchronously abandonMessage
with lock token and updated message property.CompletableFuture<Void>
abandonAsync(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)
Asynchronously abandonMessage
with lock token and updated message property.void
complete(UUID lockToken)
Completes aMessage
using its lock token.void
complete(UUID lockToken, TransactionContext transaction)
Completes aMessage
using its lock token.CompletableFuture<Void>
completeAsync(UUID lockToken)
Asynchronously completes aMessage
using its lock token.CompletableFuture<Void>
completeAsync(UUID lockToken, TransactionContext transaction)
Asynchronously completes aMessage
using its lock token.void
deadLetter(UUID lockToken)
Moves aMessage
to the deadletter sub-queue.void
deadLetter(UUID lockToken, TransactionContext transaction)
Moves aMessage
to the deadletter sub-queue.void
deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription)
Moves aMessage
to the deadletter sub-queue with deadletter reason and error description.void
deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, TransactionContext transaction)
Moves aMessage
to the deadletter sub-queue with deadletter reason and error description.void
deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String,Object> propertiesToModify)
Moves aMessage
to the deadletter sub-queue with deadletter reason and error description and modified properties.void
deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String,Object> propertiesToModify, TransactionContext transaction)
Moves aMessage
to the deadletter sub-queue with deadletter reason and error description and modified properties.void
deadLetter(UUID lockToken, Map<String,Object> propertiesToModify)
Moves aMessage
to the deadletter sub-queue with modified message properties.void
deadLetter(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)
Moves aMessage
to the deadletter sub-queue with modified message properties.CompletableFuture<Void>
deadLetterAsync(UUID lockToken)
Asynchronously moves aMessage
to the deadletter sub-queue with deadletter.CompletableFuture<Void>
deadLetterAsync(UUID lockToken, TransactionContext transaction)
Asynchronously moves aMessage
to the deadletter sub-queue with deadletter.CompletableFuture<Void>
deadLetterAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription)
Asynchronously moves aMessage
to the deadletter sub-queue with deadletter reason and error description.CompletableFuture<Void>
deadLetterAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, TransactionContext transaction)
Asynchronously moves aMessage
to the deadletter sub-queue with deadletter reason and error description.CompletableFuture<Void>
deadLetterAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String,Object> propertiesToModify)
Asynchronously moves aMessage
to the deadletter sub-queue with deadletter reason and error description and modified properties.CompletableFuture<Void>
deadLetterAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String,Object> propertiesToModify, TransactionContext transaction)
Asynchronously moves aMessage
to the deadletter sub-queue with deadletter reason and error description and modified properties.CompletableFuture<Void>
deadLetterAsync(UUID lockToken, Map<String,Object> propertiesToModify)
Asynchronously moves aMessage
to the deadletter sub-queue with modified properties.CompletableFuture<Void>
deadLetterAsync(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)
Asynchronously moves aMessage
to the deadletter sub-queue with modified properties.void
defer(UUID lockToken)
Defers aMessage
using its lock token.void
defer(UUID lockToken, TransactionContext transaction)
Defers aMessage
using its lock token.void
defer(UUID lockToken, Map<String,Object> propertiesToModify)
Defers aMessage
using its lock token with modified message property.void
defer(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)
Defers aMessage
using its lock token with modified message property.CompletableFuture<Void>
deferAsync(UUID lockToken)
Asynchronously defers aMessage
using its lock token.CompletableFuture<Void>
deferAsync(UUID lockToken, TransactionContext transaction)
Asynchronously defers aMessage
using its lock token.CompletableFuture<Void>
deferAsync(UUID lockToken, Map<String,Object> propertiesToModify)
Asynchronously defers aMessage
using its lock token with modified message propert.CompletableFuture<Void>
deferAsync(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)
Asynchronously defers aMessage
using its lock token with modified message propert.String
getEntityPath()
Gets the path of the entity this client is sending messages to or receiving messages from.protected CoreMessageReceiver
getInternalReceiver()
Instant
getLockedUntilUtc()
int
getPrefetchCount()
Get the prefetch value set.ReceiveMode
getReceiveMode()
Get current receiver'sReceiveMode
.protected String
getRequestedSessionId()
String
getSessionId()
byte[]
getState()
Gets the session state.CompletableFuture<byte[]>
getStateAsync()
Asynchronously gets the session state.protected boolean
isBrowsableSession()
protected boolean
isSessionReceiver()
protected CompletableFuture<Void>
onClose()
IMessage
peek()
reads next the active message without changing the state of the receiver or the message source.IMessage
peek(long fromSequenceNumber)
Reads next the active message without changing the state of the receiver or the message source.CompletableFuture<IMessage>
peekAsync()
Asynchronously reads the active messages without changing the state of the receiver or the message source.CompletableFuture<IMessage>
peekAsync(long fromSequenceNumber)
Asynchronously reads next the active message without changing the state of the receiver or the message source.Collection<IMessage>
peekBatch(int messageCount)
Reads next batch of the active messages without changing the state of the receiver or the message source.Collection<IMessage>
peekBatch(long fromSequenceNumber, int messageCount)
Reads next batch of the active messages without changing the state of the receiver or the message source.CompletableFuture<Collection<IMessage>>
peekBatchAsync(int messageCount)
Asynchronously reads the next batch of active messages without changing the state of the receiver or the message source.CompletableFuture<Collection<IMessage>>
peekBatchAsync(long fromSequenceNumber, int messageCount)
Asynchronously reads the next batch of active messages without changing the state of the receiver or the message source.IMessage
receive()
Receives aMessage
with default server wait time.IMessage
receive(Duration serverWaitTime)
Receives aMessage
with specified server wait time.CompletableFuture<IMessage>
receiveAsync()
Receives aMessage
from Azure Service Bus.CompletableFuture<IMessage>
receiveAsync(Duration serverWaitTime)
Receives aMessage
from Azure Service Bus with server wait time.Collection<IMessage>
receiveBatch(int maxMessageCount)
Receives a maximum of maxMessageCountMessage
from Azure Service Bus.Collection<IMessage>
receiveBatch(int maxMessageCount, Duration serverWaitTime)
Receives a maximum of maxMessageCountMessage
from Azure Service Bus with server wait time.CompletableFuture<Collection<IMessage>>
receiveBatchAsync(int maxMessageCount)
Asynchronously receives a maximum of maxMessageCountMessage
from the entity.CompletableFuture<Collection<IMessage>>
receiveBatchAsync(int maxMessageCount, Duration serverWaitTime)
Asynchronously receives a maximum of maxMessageCountMessage
from Azure Service Bus with server wait time.IMessage
receiveDeferredMessage(long sequenceNumber)
Receives a deferredMessage
.CompletableFuture<IMessage>
receiveDeferredMessageAsync(long sequenceNumber)
Asynchronously receives a specific deferredMessage
identified by sequence number.Collection<IMessage>
receiveDeferredMessageBatch(Collection<Long> sequenceNumbers)
Receives a batch of deferredMessage
.CompletableFuture<Collection<IMessage>>
receiveDeferredMessageBatchAsync(Collection<Long> sequenceNumbers)
Asynchronously receives a set of deferredMessage
from the entity.Instant
renewMessageLock(IMessage message)
Renews the lock on the message specified by the lock token.Instant
renewMessageLock(UUID lockToken)
Renews the lock on the message specified by the lock token.CompletableFuture<Instant>
renewMessageLockAsync(IMessage message)
Asynchronously renews the lock on the message specified by the lock token.CompletableFuture<Instant>
renewMessageLockAsync(UUID lockToken)
Renews the lock on the message specified by the lock token.Collection<Instant>
renewMessageLockBatch(Collection<? extends IMessage> messages)
CompletableFuture<Collection<Instant>>
renewMessageLockBatchAsync(Collection<? extends IMessage> messages)
void
renewSessionLock()
Renews the lock on the session specified by theIMessageSession.getSessionId()
.CompletableFuture<Void>
renewSessionLockAsync()
Renews the lock on the session specified by theIMessageSession.getSessionId()
.void
setPrefetchCount(int prefetchCount)
Set the prefetch count of the receiver.void
setState(byte[] sessionState)
Set a custom state on the session which can be later retrieved usingIMessageSession.getState()
.CompletableFuture<Void>
setStateAsync(byte[] sessionState)
Asynchronously set a custom state on the session which can be later retrieved usingIMessageSession.getState()
.-
Methods inherited from class com.microsoft.azure.servicebus.primitives.ClientEntity
close, closeAsync, finalize, getClientId, getIsClosed, getIsClosingOrClosed, setClosed, setClosing, throwIfClosed
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microsoft.azure.servicebus.ICloseable
close, closeAsync
-
Methods inherited from interface com.microsoft.azure.servicebus.IMessageBrowser
peek, peek, peekAsync, peekAsync, peekBatch, peekBatch, peekBatchAsync, peekBatchAsync
-
Methods inherited from interface com.microsoft.azure.servicebus.IMessageEntityClient
getEntityPath
-
Methods inherited from interface com.microsoft.azure.servicebus.IMessageReceiver
abandon, abandon, abandon, abandon, abandonAsync, abandonAsync, abandonAsync, abandonAsync, complete, complete, completeAsync, completeAsync, deadLetter, deadLetter, deadLetter, deadLetter, deadLetter, deadLetter, deadLetter, deadLetter, deadLetterAsync, deadLetterAsync, deadLetterAsync, deadLetterAsync, deadLetterAsync, deadLetterAsync, deadLetterAsync, deadLetterAsync, defer, defer, defer, defer, deferAsync, deferAsync, deferAsync, deferAsync, getPrefetchCount, getReceiveMode, receive, receive, receiveAsync, receiveAsync, receiveBatch, receiveBatch, receiveBatchAsync, receiveBatchAsync, receiveDeferredMessage, receiveDeferredMessageAsync, receiveDeferredMessageBatch, receiveDeferredMessageBatchAsync, renewMessageLock, renewMessageLock, renewMessageLockAsync, renewMessageLockAsync, setPrefetchCount
-
-
-
-
Method Detail
-
isSessionReceiver
protected final boolean isSessionReceiver()
-
isBrowsableSession
protected boolean isBrowsableSession()
-
getRequestedSessionId
protected String getRequestedSessionId()
-
getLockedUntilUtc
public Instant getLockedUntilUtc()
- Specified by:
getLockedUntilUtc
in interfaceIMessageSession
- Returns:
- Gets the time that the session identified by
IMessageSession.getSessionId()
is locked until for this client.
-
renewSessionLock
public void renewSessionLock() throws InterruptedException, ServiceBusException
Description copied from interface:IMessageSession
Renews the lock on the session specified by theIMessageSession.getSessionId()
. The lock will be renewed based on the setting specified on the entity.When you accept a session, the session is locked for this client instance by the service for a duration as specified during the Queue/Subscription creation. If processing of the session requires longer than this duration, the session-lock needs to be renewed. For each renewal, the session-lock is renewed by the entity's LockDuration.
Renewal of session renews all the messages in the session as well. Each individual message need not be renewed.
- Specified by:
renewSessionLock
in interfaceIMessageSession
- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if the renew failed.
-
renewSessionLockAsync
public CompletableFuture<Void> renewSessionLockAsync()
Description copied from interface:IMessageSession
Renews the lock on the session specified by theIMessageSession.getSessionId()
. The lock will be renewed based on the setting specified on the entity.- Specified by:
renewSessionLockAsync
in interfaceIMessageSession
- Returns:
- a CompletableFuture representing the pending renew.
- See Also:
IMessageSession.renewSessionLock()
-
setState
public void setState(byte[] sessionState) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageSession
Set a custom state on the session which can be later retrieved usingIMessageSession.getState()
.- Specified by:
setState
in interfaceIMessageSession
- Parameters:
sessionState
- The session state.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if the set state failed.
-
setStateAsync
public CompletableFuture<Void> setStateAsync(byte[] sessionState)
Description copied from interface:IMessageSession
Asynchronously set a custom state on the session which can be later retrieved usingIMessageSession.getState()
.- Specified by:
setStateAsync
in interfaceIMessageSession
- Parameters:
sessionState
- The session state.- Returns:
- a CompletableFuture representing the pending session state setting.
- See Also:
IMessageSession.setState(byte[])
-
getState
public byte[] getState() throws InterruptedException, ServiceBusException
Description copied from interface:IMessageSession
Gets the session state.- Specified by:
getState
in interfaceIMessageSession
- Returns:
- The session state
- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if get state failed.
-
getStateAsync
public CompletableFuture<byte[]> getStateAsync()
Description copied from interface:IMessageSession
Asynchronously gets the session state.- Specified by:
getStateAsync
in interfaceIMessageSession
- Returns:
- a CompletableFuture representing the pending session state retrieving.
- See Also:
IMessageSession.getState()
-
getSessionId
public String getSessionId()
- Specified by:
getSessionId
in interfaceIMessageSession
- Returns:
- Gets the SessionId.
-
getInternalReceiver
protected final CoreMessageReceiver getInternalReceiver()
-
getEntityPath
public String getEntityPath()
Description copied from interface:IMessageEntityClient
Gets the path of the entity this client is sending messages to or receiving messages from.- Specified by:
getEntityPath
in interfaceIMessageEntityClient
- Returns:
- path of the entity this client is connecting to
-
getReceiveMode
public ReceiveMode getReceiveMode()
Description copied from interface:IMessageReceiver
Get current receiver'sReceiveMode
.- Specified by:
getReceiveMode
in interfaceIMessageReceiver
- Returns:
ReceiveMode
-
abandon
public void abandon(UUID lockToken) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
AbandonMessage
with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message- Specified by:
abandon
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if abandon failed
-
abandon
public void abandon(UUID lockToken, TransactionContext transaction) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
AbandonMessage
with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message- Specified by:
abandon
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
transaction
-TransactionContext
which this operation should enlist to.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if abandon failed
-
abandon
public void abandon(UUID lockToken, Map<String,Object> propertiesToModify) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
AbandonMessage
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- Specified by:
abandon
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
propertiesToModify
- Message properties to modify.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if abandon failed
-
abandon
public void abandon(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
AbandonMessage
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- Specified by:
abandon
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
propertiesToModify
- Message properties to modify.transaction
-TransactionContext
which this operation should enlist to.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if abandon failed
-
abandonAsync
public CompletableFuture<Void> abandonAsync(UUID lockToken)
Description copied from interface:IMessageReceiver
Asynchronously abandonMessage
with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message.- Specified by:
abandonAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
- Returns:
- a CompletableFuture representing the pending abandon.
-
abandonAsync
public CompletableFuture<Void> abandonAsync(UUID lockToken, TransactionContext transaction)
Description copied from interface:IMessageReceiver
Asynchronously abandonMessage
with lock token. This will make the message available again for processing. Abandoning a message will increase the delivery count on the message.- Specified by:
abandonAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
transaction
-TransactionContext
which this operation should enlist to.- Returns:
- a CompletableFuture representing the pending abandon.
-
abandonAsync
public CompletableFuture<Void> abandonAsync(UUID lockToken, Map<String,Object> propertiesToModify)
Description copied from interface:IMessageReceiver
Asynchronously abandonMessage
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.- Specified by:
abandonAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
propertiesToModify
- Message properties to modify.- Returns:
- a CompletableFuture representing the pending abandon.
-
abandonAsync
public CompletableFuture<Void> abandonAsync(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)
Description copied from interface:IMessageReceiver
Asynchronously abandonMessage
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.- Specified by:
abandonAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
propertiesToModify
- Message properties to modify.transaction
-TransactionContext
which this operation should enlist to.- Returns:
- a CompletableFuture representing the pending abandon.
-
complete
public void complete(UUID lockToken) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Completes aMessage
using its lock token. This will delete the message from the service.- Specified by:
complete
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if abandon failed
-
complete
public void complete(UUID lockToken, TransactionContext transaction) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Completes aMessage
using its lock token. This will delete the message from the service.- Specified by:
complete
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
transaction
-TransactionContext
which this operation should enlist to.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if abandon failed
-
completeAsync
public CompletableFuture<Void> completeAsync(UUID lockToken)
Description copied from interface:IMessageReceiver
Asynchronously completes aMessage
using its lock token. This will delete the message from the service.- Specified by:
completeAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
- Returns:
- a CompletableFuture representing the pending complete.
-
completeAsync
public CompletableFuture<Void> completeAsync(UUID lockToken, TransactionContext transaction)
Description copied from interface:IMessageReceiver
Asynchronously completes aMessage
using its lock token. This will delete the message from the service.- Specified by:
completeAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
transaction
-TransactionContext
which this operation should enlist to.- Returns:
- a CompletableFuture representing the pending complete.
-
defer
public void defer(UUID lockToken) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Defers aMessage
using its lock token. This will move message into deferred subqueue.- Specified by:
defer
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if defer failed
-
defer
public void defer(UUID lockToken, TransactionContext transaction) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Defers aMessage
using its lock token. This will move message into deferred subqueue.- Specified by:
defer
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
transaction
-TransactionContext
which this operation should enlist to.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if defer failed
-
defer
public void defer(UUID lockToken, Map<String,Object> propertiesToModify) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Defers aMessage
using its lock token with modified message property. This will move message into deferred subqueue.- Specified by:
defer
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
propertiesToModify
- Message properties to modify.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if defer failed
-
defer
public void defer(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Defers aMessage
using its lock token with modified message property. This will move message into deferred subqueue.- Specified by:
defer
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
propertiesToModify
- Message properties to modify.transaction
-TransactionContext
which this operation should enlist to.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if defer failed
-
deferAsync
public CompletableFuture<Void> deferAsync(UUID lockToken)
Description copied from interface:IMessageReceiver
Asynchronously defers aMessage
using its lock token. This will move message into deferred subqueue.- Specified by:
deferAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
- Returns:
- a CompletableFuture representing the pending defer.
-
deferAsync
public CompletableFuture<Void> deferAsync(UUID lockToken, TransactionContext transaction)
Description copied from interface:IMessageReceiver
Asynchronously defers aMessage
using its lock token. This will move message into deferred subqueue.- Specified by:
deferAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
transaction
-TransactionContext
which this operation should enlist to.- Returns:
- a CompletableFuture representing the pending defer.
-
deferAsync
public CompletableFuture<Void> deferAsync(UUID lockToken, Map<String,Object> propertiesToModify)
Description copied from interface:IMessageReceiver
Asynchronously defers aMessage
using its lock token with modified message propert. This will move message into deferred subqueue.- Specified by:
deferAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
propertiesToModify
- Message properties to modify.- Returns:
- a CompletableFuture representing the pending defer.
-
deferAsync
public CompletableFuture<Void> deferAsync(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)
Description copied from interface:IMessageReceiver
Asynchronously defers aMessage
using its lock token with modified message propert. This will move message into deferred subqueue.- Specified by:
deferAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
propertiesToModify
- Message properties to modify.transaction
-TransactionContext
which this operation should enlist to.- Returns:
- a CompletableFuture representing the pending defer.
-
deadLetter
public void deadLetter(UUID lockToken) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Moves aMessage
to the deadletter sub-queue.- Specified by:
deadLetter
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if deadletter failed
-
deadLetter
public void deadLetter(UUID lockToken, TransactionContext transaction) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Moves aMessage
to the deadletter sub-queue.- Specified by:
deadLetter
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
transaction
-TransactionContext
which this operation should enlist to.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if deadletter failed
-
deadLetter
public void deadLetter(UUID lockToken, Map<String,Object> propertiesToModify) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Moves aMessage
to the deadletter sub-queue with modified message properties.- Specified by:
deadLetter
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
propertiesToModify
- Message properties to modify.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if deadletter failed
-
deadLetter
public void deadLetter(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Moves aMessage
to the deadletter sub-queue with modified message properties.- Specified by:
deadLetter
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
propertiesToModify
- Message properties to modify.transaction
-TransactionContext
which this operation should enlist to.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if deadletter failed
-
deadLetter
public void deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Moves aMessage
to the deadletter sub-queue with deadletter reason and error description.- Specified by:
deadLetter
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
deadLetterReason
- The deadletter reason.deadLetterErrorDescription
- The deadletter error description.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if deadletter failed
-
deadLetter
public void deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, TransactionContext transaction) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Moves aMessage
to the deadletter sub-queue with deadletter reason and error description.- Specified by:
deadLetter
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
deadLetterReason
- The deadletter reason.deadLetterErrorDescription
- The deadletter error description.transaction
-TransactionContext
which this operation should enlist to.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if deadletter failed
-
deadLetter
public void deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String,Object> propertiesToModify) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Moves aMessage
to the deadletter sub-queue with deadletter reason and error description and modified properties.- Specified by:
deadLetter
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
deadLetterReason
- The deadletter reason.deadLetterErrorDescription
- The deadletter error description.propertiesToModify
- Message properties to modify.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if deadletter failed
-
deadLetter
public void deadLetter(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String,Object> propertiesToModify, TransactionContext transaction) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Moves aMessage
to the deadletter sub-queue with deadletter reason and error description and modified properties.- Specified by:
deadLetter
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
deadLetterReason
- The deadletter reason.deadLetterErrorDescription
- The deadletter error description.propertiesToModify
- Message properties to modify.transaction
-TransactionContext
which this operation should enlist to.- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if deadletter failed
-
deadLetterAsync
public CompletableFuture<Void> deadLetterAsync(UUID lockToken)
Description copied from interface:IMessageReceiver
Asynchronously moves aMessage
to the deadletter sub-queue with deadletter.- Specified by:
deadLetterAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
- Returns:
- a CompletableFuture representing the pending deadletter.
-
deadLetterAsync
public CompletableFuture<Void> deadLetterAsync(UUID lockToken, TransactionContext transaction)
Description copied from interface:IMessageReceiver
Asynchronously moves aMessage
to the deadletter sub-queue with deadletter.- Specified by:
deadLetterAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
transaction
-TransactionContext
which this operation should enlist to.- Returns:
- a CompletableFuture representing the pending deadletter.
-
deadLetterAsync
public CompletableFuture<Void> deadLetterAsync(UUID lockToken, Map<String,Object> propertiesToModify)
Description copied from interface:IMessageReceiver
Asynchronously moves aMessage
to the deadletter sub-queue with modified properties.- Specified by:
deadLetterAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
propertiesToModify
- Message properties to modify.- Returns:
- a CompletableFuture representing the pending deadletter.
-
deadLetterAsync
public CompletableFuture<Void> deadLetterAsync(UUID lockToken, Map<String,Object> propertiesToModify, TransactionContext transaction)
Description copied from interface:IMessageReceiver
Asynchronously moves aMessage
to the deadletter sub-queue with modified properties.- Specified by:
deadLetterAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
propertiesToModify
- Message properties to modify.transaction
-TransactionContext
which this operation should enlist to.- Returns:
- a CompletableFuture representing the pending deadletter.
-
deadLetterAsync
public CompletableFuture<Void> deadLetterAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription)
Description copied from interface:IMessageReceiver
Asynchronously moves aMessage
to the deadletter sub-queue with deadletter reason and error description.- Specified by:
deadLetterAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
deadLetterReason
- The deadletter reason.deadLetterErrorDescription
- The deadletter error description.- Returns:
- a CompletableFuture representing the pending deadletter.
-
deadLetterAsync
public CompletableFuture<Void> deadLetterAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, TransactionContext transaction)
Description copied from interface:IMessageReceiver
Asynchronously moves aMessage
to the deadletter sub-queue with deadletter reason and error description.- Specified by:
deadLetterAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
deadLetterReason
- The deadletter reason.deadLetterErrorDescription
- The deadletter error description.transaction
-TransactionContext
which this operation should enlist to.- Returns:
- a CompletableFuture representing the pending deadletter.
-
deadLetterAsync
public CompletableFuture<Void> deadLetterAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String,Object> propertiesToModify)
Description copied from interface:IMessageReceiver
Asynchronously moves aMessage
to the deadletter sub-queue with deadletter reason and error description and modified properties.- Specified by:
deadLetterAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
deadLetterReason
- The deadletter reason.deadLetterErrorDescription
- The deadletter error description.propertiesToModify
- Message properties to modify.- Returns:
- a CompletableFuture representing the pending deadletter.
-
deadLetterAsync
public CompletableFuture<Void> deadLetterAsync(UUID lockToken, String deadLetterReason, String deadLetterErrorDescription, Map<String,Object> propertiesToModify, TransactionContext transaction)
Description copied from interface:IMessageReceiver
Asynchronously moves aMessage
to the deadletter sub-queue with deadletter reason and error description and modified properties.- Specified by:
deadLetterAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
deadLetterReason
- The deadletter reason.deadLetterErrorDescription
- The deadletter error description.propertiesToModify
- Message properties to modify.transaction
-TransactionContext
which this operation should enlist to.- Returns:
- a CompletableFuture representing the pending deadletter.
-
receive
public IMessage receive() throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Receives aMessage
with default server wait time.- Specified by:
receive
in interfaceIMessageReceiver
- Returns:
- The received
Message
or null if there is no message. - Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if receive failed
-
receive
public IMessage receive(Duration serverWaitTime) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Receives aMessage
with specified server wait time.- Specified by:
receive
in interfaceIMessageReceiver
- Parameters:
serverWaitTime
- The server wait time- Returns:
- The received
Message
or null if there is no message. - Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if receive failed
-
receiveDeferredMessage
public IMessage receiveDeferredMessage(long sequenceNumber) throws ServiceBusException, InterruptedException
Description copied from interface:IMessageReceiver
Receives a deferredMessage
. Deferred messages can only be received by using sequence number.- Specified by:
receiveDeferredMessage
in interfaceIMessageReceiver
- Parameters:
sequenceNumber
- TheMessage.getSequenceNumber()
.- Returns:
- The received
Message
or null if there is no message for given sequence number. - Throws:
ServiceBusException
- if receive failedInterruptedException
- if the current thread was interrupted while waiting
-
receiveBatch
public Collection<IMessage> receiveBatch(int maxMessageCount) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Receives a maximum of maxMessageCountMessage
from Azure Service Bus.- Specified by:
receiveBatch
in interfaceIMessageReceiver
- Parameters:
maxMessageCount
- The maximum number of messages that will be received.- Returns:
- List of messages received. Returns null if no message is found.
- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if receive failed
-
receiveBatch
public Collection<IMessage> receiveBatch(int maxMessageCount, Duration serverWaitTime) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
Receives a maximum of maxMessageCountMessage
from Azure Service Bus with server wait time.- Specified by:
receiveBatch
in interfaceIMessageReceiver
- Parameters:
maxMessageCount
- The maximum number of messages that will be received.serverWaitTime
- The time the client waits for receiving a message before it times out.- Returns:
- List of messages received. Returns null if no message is found.
- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if receive failed
-
receiveDeferredMessageBatch
public Collection<IMessage> receiveDeferredMessageBatch(Collection<Long> sequenceNumbers) throws ServiceBusException, InterruptedException
Description copied from interface:IMessageReceiver
Receives a batch of deferredMessage
.- Specified by:
receiveDeferredMessageBatch
in interfaceIMessageReceiver
- Parameters:
sequenceNumbers
- The sequence numbers of desired deferred messages.- Returns:
- List of messages received. Returns null if no message is found.
- Throws:
ServiceBusException
- if receive failedInterruptedException
- if the current thread was interrupted while waiting
-
receiveAsync
public CompletableFuture<IMessage> receiveAsync()
Description copied from interface:IMessageReceiver
Receives aMessage
from Azure Service Bus.- Specified by:
receiveAsync
in interfaceIMessageReceiver
- Returns:
- The message received. Returns null if no message is found
-
receiveAsync
public CompletableFuture<IMessage> receiveAsync(Duration serverWaitTime)
Description copied from interface:IMessageReceiver
Receives aMessage
from Azure Service Bus with server wait time.- Specified by:
receiveAsync
in interfaceIMessageReceiver
- Parameters:
serverWaitTime
- The time the client waits for receiving a message before it times out.- Returns:
- The message received. Returns null if no message is found
-
receiveBatchAsync
public CompletableFuture<Collection<IMessage>> receiveBatchAsync(int maxMessageCount)
Description copied from interface:IMessageReceiver
Asynchronously receives a maximum of maxMessageCountMessage
from the entity.- Specified by:
receiveBatchAsync
in interfaceIMessageReceiver
- Parameters:
maxMessageCount
- The maximum number of messages that will be received.- Returns:
- a CompletableFuture representing the pending receive.
-
receiveBatchAsync
public CompletableFuture<Collection<IMessage>> receiveBatchAsync(int maxMessageCount, Duration serverWaitTime)
Description copied from interface:IMessageReceiver
Asynchronously receives a maximum of maxMessageCountMessage
from Azure Service Bus with server wait time.- Specified by:
receiveBatchAsync
in interfaceIMessageReceiver
- Parameters:
maxMessageCount
- The maximum number of messages that will be received.serverWaitTime
- The time the client waits for receiving a message before it times out.- Returns:
- a CompletableFuture representing the pending receive.
-
receiveDeferredMessageAsync
public CompletableFuture<IMessage> receiveDeferredMessageAsync(long sequenceNumber)
Description copied from interface:IMessageReceiver
Asynchronously receives a specific deferredMessage
identified by sequence number.- Specified by:
receiveDeferredMessageAsync
in interfaceIMessageReceiver
- Parameters:
sequenceNumber
- The sequence number of the message that will be received.- Returns:
- a CompletableFuture representing the pending receive.
-
receiveDeferredMessageBatchAsync
public CompletableFuture<Collection<IMessage>> receiveDeferredMessageBatchAsync(Collection<Long> sequenceNumbers)
Description copied from interface:IMessageReceiver
Asynchronously receives a set of deferredMessage
from the entity.- Specified by:
receiveDeferredMessageBatchAsync
in interfaceIMessageReceiver
- Parameters:
sequenceNumbers
- The sequence numbers of the message that will be received.- Returns:
- a CompletableFuture representing the pending receive.
-
onClose
protected CompletableFuture<Void> onClose()
- Specified by:
onClose
in classClientEntity
-
getPrefetchCount
public int getPrefetchCount()
Description copied from interface:IMessageReceiver
Get the prefetch value set.- Specified by:
getPrefetchCount
in interfaceIMessageReceiver
- Returns:
- The set prefetch count value.
-
setPrefetchCount
public void setPrefetchCount(int prefetchCount) throws ServiceBusException
Description copied from interface:IMessageReceiver
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.
- Specified by:
setPrefetchCount
in interfaceIMessageReceiver
- Parameters:
prefetchCount
- The desired prefetch count.- Throws:
ServiceBusException
- if sets the value failed
-
renewMessageLockAsync
public CompletableFuture<Instant> renewMessageLockAsync(IMessage message)
Description copied from interface:IMessageReceiver
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 inReceiveMode.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.- Specified by:
renewMessageLockAsync
in interfaceIMessageReceiver
- Parameters:
message
- TheMessage
to be renewed- Returns:
- a CompletableFuture representing the pending renew.
-
renewMessageLockAsync
public CompletableFuture<Instant> renewMessageLockAsync(UUID lockToken)
Description copied from interface:IMessageReceiver
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 inReceiveMode.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 updateMessage.getLockedUntilUtc()
and updated lockedUntilUtc must be tracked by the application.- Specified by:
renewMessageLockAsync
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
- Returns:
- a CompletableFuture representing the pending renew.
-
renewMessageLockBatchAsync
public CompletableFuture<Collection<Instant>> renewMessageLockBatchAsync(Collection<? extends IMessage> messages)
-
renewMessageLockBatch
public Collection<Instant> renewMessageLockBatch(Collection<? extends IMessage> messages) throws InterruptedException, ServiceBusException
-
renewMessageLock
public Instant renewMessageLock(IMessage message) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
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 inReceiveMode.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.- Specified by:
renewMessageLock
in interfaceIMessageReceiver
- Parameters:
message
- TheMessage
to be renewed- Returns:
- The new locked until UTC time.
- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if renew failed
-
renewMessageLock
public Instant renewMessageLock(UUID lockToken) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageReceiver
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 inReceiveMode.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 updateMessage.getLockedUntilUtc()
and updated lockedUntilUtc must be tracked by the application.- Specified by:
renewMessageLock
in interfaceIMessageReceiver
- Parameters:
lockToken
- Message lock tokenMessage.getLockToken()
- Returns:
- The new locked until UTC time.
- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if renew failed
-
peek
public IMessage peek() throws InterruptedException, ServiceBusException
Description copied from interface:IMessageBrowser
reads next the active message without changing the state of the receiver or the message source. The first call toIMessageBrowser.peek()
fetches the first active message for this receiver. Each subsequent call fetches the subsequent message in the entity.- Specified by:
peek
in interfaceIMessageBrowser
- Returns:
Message
peeked- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if peek failed
-
peek
public IMessage peek(long fromSequenceNumber) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageBrowser
Reads next the active message without changing the state of the receiver or the message source.- Specified by:
peek
in interfaceIMessageBrowser
- Parameters:
fromSequenceNumber
- The sequence number from where to read the message.- Returns:
Message
peeked- Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if peek failed
-
peekBatch
public Collection<IMessage> peekBatch(int messageCount) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageBrowser
Reads next batch of the active messages without changing the state of the receiver or the message source.- Specified by:
peekBatch
in interfaceIMessageBrowser
- Parameters:
messageCount
- The number of messages.- Returns:
- Batch of
Message
peeked - Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if peek failed
-
peekBatch
public Collection<IMessage> peekBatch(long fromSequenceNumber, int messageCount) throws InterruptedException, ServiceBusException
Description copied from interface:IMessageBrowser
Reads next batch of the active messages without changing the state of the receiver or the message source.- Specified by:
peekBatch
in interfaceIMessageBrowser
- Parameters:
fromSequenceNumber
- The sequence number from where to read the message.messageCount
- The number of messages.- Returns:
- Batch of
Message
peeked - Throws:
InterruptedException
- if the current thread was interrupted while waitingServiceBusException
- if peek failed
-
peekAsync
public CompletableFuture<IMessage> peekAsync()
Description copied from interface:IMessageBrowser
Asynchronously reads the active messages without changing the state of the receiver or the message source.- Specified by:
peekAsync
in interfaceIMessageBrowser
- Returns:
Message
peeked
-
peekAsync
public CompletableFuture<IMessage> peekAsync(long fromSequenceNumber)
Description copied from interface:IMessageBrowser
Asynchronously reads next the active message without changing the state of the receiver or the message source.- Specified by:
peekAsync
in interfaceIMessageBrowser
- Parameters:
fromSequenceNumber
- The sequence number from where to read the message.- Returns:
- CompletableFuture that returns
Message
peeked.
-
peekBatchAsync
public CompletableFuture<Collection<IMessage>> peekBatchAsync(int messageCount)
Description copied from interface:IMessageBrowser
Asynchronously reads the next batch of active messages without changing the state of the receiver or the message source.- Specified by:
peekBatchAsync
in interfaceIMessageBrowser
- Parameters:
messageCount
- The number of messages.- Returns:
- CompletableFuture that returns batch of
Message
peeked.
-
peekBatchAsync
public CompletableFuture<Collection<IMessage>> peekBatchAsync(long fromSequenceNumber, int messageCount)
Description copied from interface:IMessageBrowser
Asynchronously reads the next batch of active messages without changing the state of the receiver or the message source.- Specified by:
peekBatchAsync
in interfaceIMessageBrowser
- Parameters:
fromSequenceNumber
- The sequence number from where to read the message.messageCount
- The number of messages.- Returns:
- CompletableFuture that returns batch of
Message
peeked.
-
-