CreateBatchOptions interface

Options to configure the createBatch method on the EventHubProducerClient.

  • partitionKey : A value that is hashed to produce a partition assignment.
  • maxSizeInBytes: The upper limit for the size of batch.
  • abortSignal : A signal the request to cancel the send operation.

Example usage:

{
    partitionKey: 'foo',
    maxSizeInBytes: 1024 * 1024 // 1 MB
}
Extends

Properties

maxSizeInBytes

The upper limit for the size of batch. The tryAdd function will return false after this limit is reached.

partitionId

The partition this batch will be sent to. If this value is set then partitionKey can not be set.

partitionKey

A value that is hashed to produce a partition assignment. It guarantees that messages with the same partitionKey end up in the same partition. If this value is set then partitionId can not be set.

Inherited Properties

abortSignal

The signal which can be used to abort requests.

tracingOptions

Options for configuring tracing.

Property Details

maxSizeInBytes

The upper limit for the size of batch. The tryAdd function will return false after this limit is reached.

maxSizeInBytes?: number

Property Value

number

partitionId

The partition this batch will be sent to. If this value is set then partitionKey can not be set.

partitionId?: string

Property Value

string

partitionKey

A value that is hashed to produce a partition assignment. It guarantees that messages with the same partitionKey end up in the same partition. If this value is set then partitionId can not be set.

partitionKey?: string

Property Value

string

Inherited Property Details

abortSignal

The signal which can be used to abort requests.

abortSignal?: AbortSignalLike

Property Value

Inherited From OperationOptions.abortSignal

tracingOptions

Options for configuring tracing.

tracingOptions?: OperationTracingOptions

Property Value

Inherited From OperationOptions.tracingOptions