Options
All
  • Public
  • Public/Protected
  • All
Menu

@azure/event-hubs

Package version

Index

Type aliases

ConnectionContextMethods

ConnectionContextMethods: Omit<FunctionProperties<ConnectionContextInternalMembers>, FunctionPropertyNames<ConnectionContextBase>> & ThisType<ConnectionContextInternalMembers>

Helper type to get the types of all the functions on ConnectionContext and the internal methods from ConnectionContextInternalMembers. Note that this excludes the functions that ConnectionContext inherits. Each function also has its this type set as ConnectionContext.

FunctionProperties

FunctionProperties<T>: Pick<T, FunctionPropertyNames<T>>

Helper type to get the types of all the functions on an object.

Type parameters

  • T

FunctionPropertyNames

FunctionPropertyNames<T>: {}[keyof T]

Helper type to get the names of all the functions on an object.

Type parameters

  • T

ProcessCloseHandler

ProcessCloseHandler: (reason: CloseReason, context: PartitionContext) => Promise<void>

Signature of the user provided function invoked by EventHubConsumerClient just after stopping to receive events from a partition.

Type declaration

ProcessErrorHandler

ProcessErrorHandler: (error: Error | MessagingError, context: PartitionContext) => Promise<void>

Signature of the user provided function invoked by EventHubConsumerClient for errors that occur when receiving events or when executing any of the user provided functions passed to the subscribe() method.

Type declaration

    • Parameters

      Returns Promise<void>

ProcessEventsHandler

ProcessEventsHandler: (events: ReceivedEventData[], context: PartitionContext) => Promise<void>

Signature of the user provided function invoked by EventHubConsumerClient when a set of events is received.

Type declaration

ProcessInitializeHandler

ProcessInitializeHandler: (context: PartitionContext) => Promise<void>

Signature of the user provided function invoked by EventHubConsumerClient just before starting to receive events from a partition.

Type declaration

Variables

Const largeMessageOverhead

largeMessageOverhead: 8 = 8

The amount of bytes to reserve as overhead for a large message.

Const logger

logger: any = createClientLogger("event-hubs")

The @azure/logger configuration for this package. This will output logs using the azure:event-hubs namespace prefix.

Const messagePropertiesMap

messagePropertiesMap: { absolute_expiry_time: "absoluteExpiryTime"; content_encoding: "contentEncoding"; content_type: "contentType"; correlation_id: "correlationId"; creation_time: "creationTime"; group_id: "groupId"; group_sequence: "groupSequence"; message_id: "messageId"; reply_to: "replyTo"; reply_to_group_id: "replyToGroupId"; subject: "subject"; to: "to"; user_id: "userId" } = {message_id: "messageId",user_id: "userId",to: "to",subject: "subject",reply_to: "replyTo",correlation_id: "correlationId",content_type: "contentType",content_encoding: "contentEncoding",absolute_expiry_time: "absoluteExpiryTime",creation_time: "creationTime",group_id: "groupId",group_sequence: "groupSequence",reply_to_group_id: "replyToGroupId"} as const

Type declaration

  • absolute_expiry_time: "absoluteExpiryTime"
  • content_encoding: "contentEncoding"
  • content_type: "contentType"
  • correlation_id: "correlationId"
  • creation_time: "creationTime"
  • group_id: "groupId"
  • group_sequence: "groupSequence"
  • message_id: "messageId"
  • reply_to: "replyTo"
  • reply_to_group_id: "replyToGroupId"
  • subject: "subject"
  • to: "to"
  • user_id: "userId"

Let self

self: Window & typeof globalThis & { navigator: Navigator }

Const smallMessageMaxBytes

smallMessageMaxBytes: 255 = 255

The maximum number of bytes that a message may be to be considered small.

Const smallMessageOverhead

smallMessageOverhead: 5 = 5

The amount of bytes to reserve as overhead for a small message.

Functions

getOwnerLevel

  • getOwnerLevel(options: SubscribeOptions | undefined, userChoseCheckpointStore: boolean): number | undefined

getReleaseInfo

  • getReleaseInfo(): string

getStartPosition

instrumentEventData

  • Populates the EventData with SpanContext info to support trace propagation. Creates and returns a copy of the passed in EventData unless the EventData has already been instrumented.

    Parameters

    • eventData: EventData

      The EventData to instrument.

    • span: Span

      The Span containing the context to propagate tracing information.

    Returns EventData

isAbandoned

parseEventHubConnectionString

  • Parses given connection string into the different properties applicable to Azure Event Hubs. The properties are useful to then construct an EventHub{Producer|Consumer}Client.

    Parameters

    • connectionString: string

      The connection string associated with the Shared Access Policy created for the Event Hubs namespace.

    Returns Readonly<EventHubConnectionStringProperties>

validateEventPosition

Object literals

Const defaultConsumerClientOptions

defaultConsumerClientOptions: object

maxBatchSize

maxBatchSize: number = 1

maxWaitTimeInSeconds

maxWaitTimeInSeconds: number = 60

Const earliestEventPosition

earliestEventPosition: object

Gets the EventPosition corresponding to the location of the the first event present in the partition. Pass this position to the EventHubConsumerClient.subscribe() method to begin receiving events from the first event in the partition which has not expired due to the retention policy.

offset

offset: number = -1

Const latestEventPosition

latestEventPosition: object

Gets the EventPosition corresponding to the end of the partition. Pass this position to the EventHubConsumerClient.subscribe() method to begin receiving events from the event that is enqueued right after the method call.

returns

EventPosition

offset

offset: "@latest" = "@latest"

Generated using TypeDoc