SubscribeOptions interface

Options to configure the subscribe method on the EventHubConsumerClient. For example, { maxBatchSize: 20, maxWaitTimeInSeconds: 120, startPosition: { sequenceNumber: 123 } }

Properties

maxBatchSize

The number of events to request per batch

maxWaitTimeInSeconds

The maximum amount of time to wait to build up the requested message count before passing the data to user code for processing. If not provided, it defaults to 60 seconds.

ownerLevel

The owner level to use as this subscription subscribes to partitions.

prefetchCount

The count of events requested eagerly and queued without regard to whether a read was requested.

skipParsingBodyAsJson

Option to disable the client from running JSON.parse() on the message body when receiving the message. Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you prefer to work directly with the bytes present in the message body than have the client attempt to parse it.

startPosition

The event position in a partition to start receiving events from if no checkpoint is found. Pass a map of partition id to position if you would like to use different starting position for each partition.

tracingOptions

Options for configuring tracing.

trackLastEnqueuedEventProperties

Indicates whether or not the consumer should request information on the last enqueued event on its associated partition, and track that information as events are received.

When information about the partition's last enqueued event is being tracked, each event received from the Event Hubs service will carry metadata about the partition that it otherwise would not. This results in a small amount of additional network bandwidth consumption that is generally a favorable trade-off when considered against periodically making requests for partition properties using the Event Hub client.

Property Details

maxBatchSize

The number of events to request per batch

maxBatchSize?: number

Property Value

number

maxWaitTimeInSeconds

The maximum amount of time to wait to build up the requested message count before passing the data to user code for processing. If not provided, it defaults to 60 seconds.

maxWaitTimeInSeconds?: number

Property Value

number

ownerLevel

The owner level to use as this subscription subscribes to partitions.

ownerLevel?: number

Property Value

number

prefetchCount

The count of events requested eagerly and queued without regard to whether a read was requested.

prefetchCount?: number

Property Value

number

skipParsingBodyAsJson

Option to disable the client from running JSON.parse() on the message body when receiving the message. Not applicable if the message was sent with AMQP body type value or sequence. Use this option when you prefer to work directly with the bytes present in the message body than have the client attempt to parse it.

skipParsingBodyAsJson?: boolean

Property Value

boolean

startPosition

The event position in a partition to start receiving events from if no checkpoint is found. Pass a map of partition id to position if you would like to use different starting position for each partition.

startPosition?: EventPosition | {[partitionId: string]: EventPosition}

Property Value

EventPosition | {[partitionId: string]: EventPosition}

tracingOptions

Options for configuring tracing.

tracingOptions?: OperationTracingOptions

Property Value

trackLastEnqueuedEventProperties

Indicates whether or not the consumer should request information on the last enqueued event on its associated partition, and track that information as events are received.

When information about the partition's last enqueued event is being tracked, each event received from the Event Hubs service will carry metadata about the partition that it otherwise would not. This results in a small amount of additional network bandwidth consumption that is generally a favorable trade-off when considered against periodically making requests for partition properties using the Event Hub client.

trackLastEnqueuedEventProperties?: boolean

Property Value

boolean