Path of the entity for which the receiver has been created.
Returns true
if either the receiver or the client that created it has been closed.
The receive mode used to create the receiver.
The session ID.
The time in UTC until which the session is locked.
Every time renewSessionLock()
is called, this time gets updated to current time plus the lock
duration as specified during the Queue/Subscription creation.
Will return undefined until a AMQP receiver link has been successfully set up for the session.
The lock held on the message by the receiver is let go, making the message available again in Service Bus for another receive operation.
The properties of the message to modify while abandoning the message.
Closes the receiver.
Once closed, the receiver cannot be used for any further operations.
Use the createReceiver()
method on the ServiceBusClient to create a new Receiver.
Removes the message from Service Bus.
Moves the message to the deadletter sub-queue. To receive a deadletted message, create a new QueueClient/SubscriptionClient using the path for the deadletter sub-queue.
The DeadLetter options that can be provided while rejecting the message.
Defers the processing of the message. Save the sequenceNumber
of the message, in order to
receive it message again in the future using the receiveDeferredMessage
method.
The properties of the message to modify while deferring the message
Returns an iterator that can be used to receive messages from Service Bus.
A set of options to control the receive operation.
abortSignal
: The signal to use to abort the ongoing operation.Gets the state of the Session. For more on session states, see Session State
Options bag to pass an abort signal or tracing options.
The state of that session
Peek the next batch of active messages (including deferred but not deadlettered messages) on the queue or subscription without modifying them.
peekMessages()
fetches the first active message. Each subsequent call fetches the
subsequent message.Completed/Abandoned/Deferred/Deadlettered
.The maximum number of messages to peek.
Options that allow to specify the maximum number of messages to peek, the sequenceNumber to start peeking from or an abortSignal to abort the operation.
Returns a promise that resolves to an array of deferred messages identified by given sequenceNumbers
.
The sequence number or an array of sequence numbers for the messages that need to be received.
Options bag to pass an abort signal or tracing options.
A list of messages identified by the given sequenceNumbers or an empty list if no messages are found.
Returns a promise that resolves to an array of messages received from Service Bus.
The maximum number of messages to receive.
A set of options to control the receive operation.
maxWaitTimeInMs
: The maximum time to wait for the first message before returning an empty array if no messages are available.abortSignal
: The signal to use to abort the ongoing operation.A promise that resolves with an array of messages.
Renews the lock on the message for the duration as specified during the Queue/Subscription creation.
lockedUntilUtc
property on the message for the time when the lock expires.complete()
, defer()
or deadletter()
,
before its lock expires, then the message lands back in the Queue/Subscription for the next
receive operation.New lock token expiry date and time in UTC format.
Renews the lock on the session.
Sets the state on the Session. For more on session states, see Session State
The state that needs to be set.
Options bag to pass an abort signal or tracing options.
Streams messages to message handlers.
A handler that gets called for messages and errors.
Options for subscribe.
An object that can be closed, sending any remaining messages to handlers
and
stopping new messages from arriving.
Causes the subscriber to stop receiving new messages.
Generated using TypeDoc
A receiver that handles sessions, including renewing the session lock.