Skip to content

API reference / @node-ts/bus-messages / MessageAttributes

Interface: MessageAttributes<AttributesType, StickyAttributesType> ​

Defined in: packages/bus-messages/src/message-attributes.ts:16

Options that control the behaviour around how the message is sent and additional information that travels with it.

Type Parameters ​

Type ParameterDefault type
AttributesType extends MessageAttributeMapMessageAttributeMap
StickyAttributesType extends MessageAttributeMapMessageAttributeMap

Properties ​

PropertyTypeDescriptionDefined in
attributesAttributesTypeAdditional metadata that will be sent alongside the message payload. This is useful for sending information like: - the id of a user where the message originated from - the originating system hostname or IP for auditing information - when the message was first sent These attributes will be attached to the outgoing message, but will not propagate beyond the first receiptpackages/bus-messages/src/message-attributes.ts:37
correlationId?stringAn identifier that can be used to relate or group messages together. This value is sticky, in that any messages that are sent as a result of receiving one message will be sent out with this same correlationId.packages/bus-messages/src/message-attributes.ts:25
stickyAttributesStickyAttributesTypeAdditional metadata that will be sent alongside the message payload. This is useful for sending information like: - The id of the user who originally sent the message that triggered this message These values are sticky, in that they will propagate for any message that is sent as a result of receiving the message with sticky attributes.packages/bus-messages/src/message-attributes.ts:47

Released under the MIT License.