EventHubConsumerClientOptions interface

Describes the options that can be provided while creating the EventHubConsumerClient.

  • loadBalancingOptions: Options to tune how the EventHubConsumerClient claims partitions.
  • userAgent : A string to append to the built in user agent string that is passed as a connection property to the service.
  • webSocketOptions : Options to configure the channelling of the AMQP connection over Web Sockets.
    • 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.
    • maxRetries : The number of times the operation can be retried in case of a retryable error.
    • maxRetryDelayInMs: The maximum delay between retries. Applicable only when performing exponential retries.
    • mode: Which retry mode to apply, specified by the RetryMode enum. Options are Exponential and Fixed. Defaults to Fixed.
    • retryDelayInMs: Amount of time to wait in milliseconds before making the next attempt. When mode is set to Exponential, this is used to compute the exponentially increasing delays between retries. Default: 30000 milliseconds.
    • timeoutInMs: Amount of time in milliseconds to wait before the operation times out. This will trigger a retry if there are any retry attempts remaining. Default value: 60000 milliseconds.

A simple usage can be { "maxRetries": 4 }.

Example usage:

{
    retryOptions: {
        maxRetries: 4
    }
}
Extends

Properties

loadBalancingOptions

Options to tune how the EventHubConsumerClient claims partitions.

Inherited Properties

customEndpointAddress

A custom endpoint to use when connecting to the Event Hubs service. This can be useful when your network does not allow connecting to the standard Azure Event Hubs endpoint address, but does allow connecting through an intermediary.

Example: "https://my.custom.endpoint:100/"

identifier

A unique name used to identify the client. If not provided, a GUID will be used as the identifier

retryOptions

Options to configure the retry policy for all the operations on the client. For example, { "maxRetries": 4 } or { "maxRetries": 4, "retryDelayInMs": 30000 }.

userAgent

Value that is appended to the built in user agent string that is passed to the Event Hubs service.

webSocketOptions

Options to configure the channelling of the AMQP connection over Web Sockets.

Property Details

loadBalancingOptions

Options to tune how the EventHubConsumerClient claims partitions.

loadBalancingOptions?: LoadBalancingOptions

Property Value

Inherited Property Details

customEndpointAddress

A custom endpoint to use when connecting to the Event Hubs service. This can be useful when your network does not allow connecting to the standard Azure Event Hubs endpoint address, but does allow connecting through an intermediary.

Example: "https://my.custom.endpoint:100/"

customEndpointAddress?: string

Property Value

string

Inherited From EventHubClientOptions.customEndpointAddress

identifier

A unique name used to identify the client. If not provided, a GUID will be used as the identifier

identifier?: string

Property Value

string

Inherited From EventHubClientOptions.identifier

retryOptions

Options to configure the retry policy for all the operations on the client. For example, { "maxRetries": 4 } or { "maxRetries": 4, "retryDelayInMs": 30000 }.

retryOptions?: RetryOptions

Property Value

Inherited From EventHubClientOptions.retryOptions

userAgent

Value that is appended to the built in user agent string that is passed to the Event Hubs service.

userAgent?: string

Property Value

string

Inherited From EventHubClientOptions.userAgent

webSocketOptions

Options to configure the channelling of the AMQP connection over Web Sockets.

webSocketOptions?: WebSocketOptions

Property Value

Inherited From EventHubClientOptions.webSocketOptions