EventData interface

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 EventHubProducerClient. For example, { body: "your-data" } or

{
   body: "your-data",
   properties: {
      propertyName: "property value"
   }
}

Properties

body

The message body that needs to be sent. If the application reading the events is not using this SDK, convert your body payload to a byte array or Buffer for better cross-language compatibility.

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.

messageId

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

Note: Numbers that are not whole integers are not allowed.

properties

Set of key value pairs that can be used to set properties specific to user application.

Property Details

body

The message body that needs to be sent. If the application reading the events is not using this SDK, convert your body payload to a byte array or Buffer for better cross-language compatibility.

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

messageId

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

Note: Numbers that are not whole integers are not allowed.

messageId?: string | number | Buffer

Property Value

string | number | Buffer

properties

Set of key value pairs that can be used to set properties specific to user application.

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

Property Value

{[key: string]: any}