Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CreateBatchOptions

Package version

The set of options to configure the createBatch operation on the EventProducer.

  • partitionKey : A value that is hashed to produce a partition assignment. Not applicable if the EventHubProducer was created using a partitionId.
  • maxSizeInBytes: The upper limit for the size of batch. The tryAdd function will return false after this limit is reached.
  • abortSignal : A signal the request to cancel the send operation.

Example usage:

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

Hierarchy

  • CreateBatchOptions

Index

Properties

Optional abortSignal

abortSignal: AbortSignalLike
property

An implementation of the AbortSignalLike interface to signal the request to cancel the operation. For example, use the @azure/abort-controller to create an AbortSignal.

Optional maxSizeInBytes

maxSizeInBytes: undefined | number
property

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

Optional partitionKey

partitionKey: undefined | string
property

A value that is hashed to produce a partition assignment. It guarantees that messages with the same partitionKey end up in the same partition. Specifying this will throw an error if the producer was created using a paritionId.

Generated using TypeDoc