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. |
content |
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". |
correlation |
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. |
enqueued |
The enqueued time of the event. |
message |
The message identifier is an application-defined value that uniquely identifies the message and its payload. |
offset | The offset of the event. |
partition |
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. |
sequence |
The sequence number of the event. |
system |
The properties set by the service. |
Methods
get |
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