---
url: https://node-ts.github.io/bus/api/bus-messages/interfaces/MessageAttributes.md
---
[API reference](../../index.md) / [@node-ts/bus-messages](../index.md) / MessageAttributes

# Interface: MessageAttributes\<AttributesType, StickyAttributesType>

Defined in: [packages/bus-messages/src/message-attributes.ts:16](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-messages/src/message-attributes.ts#L16)

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

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `AttributesType` *extends* [`MessageAttributeMap`](MessageAttributeMap.md) | [`MessageAttributeMap`](MessageAttributeMap.md) |
| `StickyAttributesType` *extends* [`MessageAttributeMap`](MessageAttributeMap.md) | [`MessageAttributeMap`](MessageAttributeMap.md) |

## Properties

| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| <a id="property-attributes"></a> `attributes` | `AttributesType` | Additional 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 receipt | [packages/bus-messages/src/message-attributes.ts:37](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-messages/src/message-attributes.ts#L37) |
| <a id="property-correlationid"></a> `correlationId?` | `string` | An 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](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-messages/src/message-attributes.ts#L25) |
| <a id="property-stickyattributes"></a> `stickyAttributes` | `StickyAttributesType` | Additional 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](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-messages/src/message-attributes.ts#L47) |
