Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CreateSessionReceiverOptions<ReceiveModeT>

Package version

Describes the options passed to the createSessionReceiver method when using a Queue/Subscription that has sessions enabled.

export
interface

CreateSessionReceiverOptions

template

ReceiveModeT

Type parameters

Hierarchy

  • {}
    • CreateSessionReceiverOptions

Index

Properties

Optional maxAutoRenewLockDurationInMs

maxAutoRenewLockDurationInMs: undefined | number
property

The maximum duration in milliseconds until which, the lock on the session will be renewed automatically by the sdk.

  • Default: 300000 milliseconds (5 minutes).
  • To disable autolock renewal, set this to 0.

Optional receiveMode

receiveMode: ReceiveModeT

Represents the receive mode for the receiver.

In receiveAndDelete mode, messages are deleted from Service Bus as they are received.

In peekLock mode, the receiver has a lock on the message for the duration specified on the queue/subscription.

Messages that are not settled within the lock duration will be redelivered as many times as the max delivery count set on the queue/subscription, after which they get sent to a separate dead letter queue.

You can settle a message by calling complete(), abandon(), defer() or deadletter() methods on the message.

More information about how peekLock and message settlement works here: https://docs.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock

Optional sessionId

sessionId: undefined | string
property

The id of the session from which messages need to be received. If null or undefined is provided, Service Bus chooses a random session from available sessions.

Generated using TypeDoc