@azure/event-hubs package
Classes
EventHubBufferedProducerClient |
The The Depending on the options specified when events are enqueued, they may be automatically assigned to a partition, grouped according to the specified partition key, or assigned a specifically requested partition. This model is intended to shift the burden of batch management from callers, at the cost of non-deterministic timing, for when events will be published. There are additional trade-offs to consider, as well:
In scenarios where it is important to have events published immediately with a deterministic
outcome, ensure that partition keys are assigned to a partition consistent with other
publishers, or where maximizing availability is a requirement, using the
|
EventHubConsumerClient |
The There are multiple ways to create an
Optionally, you can also pass:
|
EventHubProducerClient |
The There are multiple ways to create an
Optionally, you can also pass an options bag to configure the retry policy or proxy settings. |
MessagingError |
Describes the base class for Messaging Error. |
Interfaces
BufferedCloseOptions |
Options to configure the |
BufferedFlushOptions |
Options to configure the |
Checkpoint |
A checkpoint is meant to represent the last successfully processed event by the user from a particular partition of a consumer group in an Event Hub instance. When the Users are never expected to interact with |
CheckpointStore |
A checkpoint store stores and retrieves partition ownership information and checkpoint details for each partition in a given consumer group of an event hub instance. Users are not meant to implement an Implementations of |
CreateBatchOptions |
Options to configure the
Example usage:
|
EnqueueEventOptions |
Options to configure the |
EventData |
The interface that describes the data to be sent to Event Hub.
Use this as a reference when creating the object to be sent when using the
|
EventDataAdapterParameters |
Parameters to the |
EventDataBatch |
An interface representing a batch of events which can be used to send events to Event Hub. To create the batch, use the |
EventHubBufferedProducerClientOptions |
Describes the options that can be provided while creating the |
EventHubClientOptions |
Describes the options that can be provided while creating the EventHubClient.
A simple usage can be Example usage:
|
EventHubConnectionStringProperties |
The set of properties that comprise an Event Hub connection string. |
EventHubConsumerClientOptions |
Describes the options that can be provided while creating the EventHubConsumerClient.
A simple usage can be Example usage:
|
EventHubProperties |
Describes the runtime information of an Event Hub. |
EventPosition |
Represents the position of an event in an Event Hub partition, typically used when calling the To get an EventPosition representing the start or end of the stream, use the constants
|
GetEventHubPropertiesOptions |
The set of options to configure the behavior of
|
GetPartitionIdsOptions |
The set of options to configure the behavior of
|
GetPartitionPropertiesOptions |
The set of options to configure the behavior of
|
LastEnqueuedEventProperties |
A set of information about the last enqueued event of a partition, as observed by the consumer as events are received from the Event Hubs service |
LoadBalancingOptions |
An options bag to configure load balancing settings. |
OnSendEventsErrorContext |
Contains the events that were not successfully sent to the Event Hub, the partition they were assigned to, and the error that was encountered while sending. |
OnSendEventsSuccessContext |
Contains the events that were successfully sent to the Event Hub, and the partition they were assigned to. |
OperationOptions |
Options for configuring tracing and the abortSignal. |
PartitionContext |
Interface that describes the context passed to each of the functions that are a part
of the |
PartitionOwnership |
An interface representing the details on which instance of a Note: This is used internally by the |
PartitionProperties |
Describes the runtime information of an EventHub Partition. |
ReceivedEventData |
The interface that describes the structure of the event received from Event Hub.
Use this as a reference when creating the |
RetryOptions |
Retry policy options that determine the mode, number of retries, retry interval etc. |
SendBatchOptions |
Options to configure the
|
SubscribeOptions |
Options to configure the |
Subscription |
Interface that describes the object returned by the |
SubscriptionEventHandlers |
Interface that describes the functions to be implemented by the user which are invoked by
the |
TokenCredential |
Represents a credential capable of providing an authentication token. |
TryAddOptions |
Options to configure the behavior of the |
WebSocketImpl |
Describes the required shape of WebSocket constructors. |
WebSocketOptions |
Options to configure the channelling of the AMQP connection over Web Sockets. |
Type Aliases
ProcessCloseHandler |
Signature of the user provided function invoked by |
ProcessErrorHandler |
Signature of the user provided function invoked by |
ProcessEventsHandler |
Signature of the user provided function invoked by |
ProcessInitializeHandler |
Signature of the user provided function invoked by |
Enums
CloseReason |
An enum representing the different reasons for an |
RetryMode |
Describes the Retry Mode type |
Functions
create |
A function that constructs an event data adapter. That adapter can be used
with |
parse |
Parses given connection string into the different properties applicable to Azure Event Hubs. The properties are useful to then construct an EventHubProducerClient or an EventHubConsumerClient. |
Function Details
createEventDataAdapter(EventDataAdapterParameters)
A function that constructs an event data adapter. That adapter can be used
with @azure/schema-registry-avro
to encode and decode body in event data.
function createEventDataAdapter(params?: EventDataAdapterParameters): MessageAdapter<EventData>
Parameters
- params
- EventDataAdapterParameters
parameters to create the event data
Returns
MessageAdapter<EventData>
An event data adapter that can produce and consume event data
parseEventHubConnectionString(string)
Parses given connection string into the different properties applicable to Azure Event Hubs. The properties are useful to then construct an EventHubProducerClient or an EventHubConsumerClient.
function parseEventHubConnectionString(connectionString: string): Readonly<EventHubConnectionStringProperties>
Parameters
- connectionString
-
string
The connection string associated with the Shared Access Policy created for the Event Hubs namespace.
Returns
Readonly<EventHubConnectionStringProperties>