The connection string to use for connecting to the Event Hubs namespace. It is expected that the shared key properties and the Event Hub path are contained in this connection string. e.g. 'Endpoint=sb://my-servicebus-namespace.servicebus.windows.net/;SharedAccessKeyName=my-SA-name;SharedAccessKey=my-SA-key;EntityPath=my-event-hub-name'.
A set of options to apply when configuring the client.
dataTransformer
: A set of encode
/decode
methods to be used to encode an event before sending to service
and to decode the event received from the serviceuserAgent
: A string to append to the built in user agent string that is passed as a connection property
to the service.websocket
: The WebSocket constructor used to create an AMQP connection if you choose to make the connection
over a WebSocket.webSocketConstructorOptions
: Options to pass to the Websocket constructor when you choose to make the connection
over a WebSocket.retryOptions
: The retry options for all the operations on the client/producer/consumer.
A simple usage can be { "maxRetries": 4 }
.The connection string to use for connecting to the Event Hubs namespace. It is expected that the shared key properties and the Event Hub path are contained in this connection string. e.g. 'Endpoint=sb://my-servicebus-namespace.servicebus.windows.net/;SharedAccessKeyName=my-SA-name;SharedAccessKey=my-SA-key;EntityPath=my-event-hub-name'.
The path of the specific Event Hub to connect the client to.
A set of options to apply when configuring the client.
dataTransformer
: A set of encode
/decode
methods to be used to encode an event before sending to service
and to decode the event received from the serviceuserAgent
: A string to append to the built in user agent string that is passed as a connection property
to the service.websocket
: The WebSocket constructor used to create an AMQP connection if you choose to make the connection
over a WebSocket.webSocketConstructorOptions
: Options to pass to the Websocket constructor when you choose to make the connection
over a WebSocket.retryOptions
: The retry options for all the operations on the client/producer/consumer.
A simple usage can be { "maxRetries": 4 }
.The fully qualified host name for the Event Hubs namespace. This is likely to be similar to
The path of the specific Event Hub to connect the client to.
SharedKeyCredential object or your credential that implements the TokenCredential interface.
A set of options to apply when configuring the client.
dataTransformer
: A set of encode
/decode
methods to be used to encode an event before sending to service
and to decode the event received from the serviceuserAgent
: A string to append to the built in user agent string that is passed as a connection property
to the service.websocket
: The WebSocket constructor used to create an AMQP connection if you choose to make the connection
over a WebSocket.webSocketConstructorOptions
: Options to pass to the Websocket constructor when you choose to make the connection
over a WebSocket.retryOptions
: The retry options for all the operations on the client/producer/consumer.
A simple usage can be { "maxRetries": 4 }
.Closes the AMQP connection to the Event Hub instance, returning a promise that will be resolved when disconnection is completed.
Promise
Provides an array of partitionIds.
A promise that resolves with an Array of strings.
Provides information about the specified partition.
Partition ID for which partition information is required.
A promise that resoloves with PartitionProperties.
Provides the Event Hub runtime information.
A promise that resolves with EventHubProperties.
Subscribe to all messages from all available partitions.
Use this overload if you want to read from all partitions and not coordinate with other subscribers.
The name of the consumer group from which you want to process events.
Called when new events are received.
Options to handle additional events related to partitions (errors, opening, closing) as well as batch sizing.
Subscribe to all messages from a subset of partitions.
Use this overload if you want to read from a specific set of partitions and not coordinate with other subscribers.
The name of the consumer group from which you want to process events.
Called when new events are received.
A partition id to subscribe to.
Options to handle additional events related to partitions (errors, opening, closing) as well as batch sizing.
Subscribes to multiple partitions.
Use this overload if you want to coordinate with other subscribers using a PartitionManager
The name of the consumer group from which you want to process events.
Called when new events are received. This is also a good place to update checkpoints as appropriate.
A partition manager that manages ownership information and checkpoint details.
Options to handle additional events related to partitions (errors, opening, closing) as well as batch sizing.
Generated using TypeDoc
The
EventHubConsumerClient
is the main point of interaction for consuming events in Azure Event Hubs service.There are multiple ways to create an
EventHubConsumerClient
<yournamespace>.servicebus.windows.net
, and a credentials object.