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

isAbandoned

validateEventPosition

Object literals

Const EventHubConnectionConfig

EventHubConnectionConfig: object

Describes the connection config object that is created after parsing an EventHub connection string. It also provides some convenience methods for getting the address and audience for different entities.

module

EventHubConnectionConfig

create

  • Creates the connection config.

    Parameters

    • connectionString: string

      The connection string for a given service like EventHub/ServiceBus.

    • Optional path: undefined | string

    Returns EventHubConnectionConfig

    EventHubConnectionConfig

createFromConnectionConfig

  • Creates an EventHubConnectionConfig from the provided base ConnectionConfig.

    Parameters

    • config: ConnectionConfig

      The base connection config from which the EventHubConnectionConfig needs to be created.

    Returns EventHubConnectionConfig

    EventHubConnectionConfig

validate

Const defaultConsumerClientOptions

defaultConsumerClientOptions: object

maxBatchSize

maxBatchSize: number = 1

maxWaitTimeInSeconds

maxWaitTimeInSeconds: number = 60

Const defaultDataTransformer

defaultDataTransformer: object

The default data transformer that will be used by the Azure SDK.

internal
ingore

decode

  • decode(body: any): any
  • property

    {Function} [decode] A function that takes the body property from an AMQP message (an AMQP Data type (data section in rhea terms)) and returns the decoded message body. If it cannot decode the body then it returns the body as-is.

    Parameters

    • body: any

      The AMQP message body

    Returns any

    decoded body or the given body as-is.

encode

  • encode(body: any): any
  • A function that takes the body property from an EventData object and returns an encoded body (some form of AMQP type).

    Parameters

    • body: any

      The AMQP message body

    Returns any

    encodedBody - The encoded AMQP message body as an AMQP Data type (data section in rhea terms). Section object with following properties:

    • typecode: 117 (0x75)
    • content: The given AMQP message body as a Buffer.
    • multiple: true | undefined.

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