ReceivedEventData interface

The interface that describes the structure of the event received from Event Hub. Use this as a reference when creating the processEvents function to process the events recieved from an Event Hub when using the EventHubConsumerClient.

Properties

body

The message body that needs to be sent or is received.

contentType

The content type of the message. Optionally describes the payload of the message, with a descriptor following the format of RFC2045, Section 5, for example "application/json".

correlationId

The correlation identifier that allows an application to specify a context for the message for the purposes of correlation, for example reflecting the MessageId of a message that is being replied to.

enqueuedTimeUtc

The enqueued time of the event.

messageId

The message identifier is an application-defined value that uniquely identifies the message and its payload.

offset

The offset of the event.

partitionKey

When specified Event Hub will hash this to a partitionId. It guarantees that messages end up in a specific partition on the event hub.

properties

The application specific properties.

sequenceNumber

The sequence number of the event.

systemProperties

The properties set by the service.

Methods

getRawAmqpMessage()

Returns the underlying raw amqp message.

Property Details

body

The message body that needs to be sent or is received.

body: any

Property Value

any

contentType

The content type of the message. Optionally describes the payload of the message, with a descriptor following the format of RFC2045, Section 5, for example "application/json".

contentType?: string

Property Value

string

correlationId

The correlation identifier that allows an application to specify a context for the message for the purposes of correlation, for example reflecting the MessageId of a message that is being replied to.

correlationId?: string | number | Buffer

Property Value

string | number | Buffer

enqueuedTimeUtc

The enqueued time of the event.

enqueuedTimeUtc: Date

Property Value

Date

messageId

The message identifier is an application-defined value that uniquely identifies the message and its payload.

messageId?: string | number | Buffer

Property Value

string | number | Buffer

offset

The offset of the event.

offset: number

Property Value

number

partitionKey

When specified Event Hub will hash this to a partitionId. It guarantees that messages end up in a specific partition on the event hub.

partitionKey: null | string

Property Value

null | string

properties

The application specific properties.

properties?: {[key: string]: any}

Property Value

{[key: string]: any}

sequenceNumber

The sequence number of the event.

sequenceNumber: number

Property Value

number

systemProperties

The properties set by the service.

systemProperties?: {[key: string]: any}

Property Value

{[key: string]: any}

Method Details

getRawAmqpMessage()

Returns the underlying raw amqp message.

function getRawAmqpMessage(): AmqpAnnotatedMessage

Returns