Interface TopicMessage<BODY>

Represents a message published to a topic.

The message is transported to all consumers subscribed to the topic.

Type Parameters

  • BODY = any

Hierarchy

Properties

body?: BODY

Optional message.

headers: Map<string, any>

Additional information attached to this message.

Header values must be JSON serializable. If no headers are set, the Map is empty.

params?: Map<string, string>

Contains the resolved values of the wildcard segments as specified in the topic. For example: If subscribed to the topic person/:id and a message is published to the topic person/5, the resolved id with the value 5 is contained in the params map.

retain?: boolean

Indicates whether this message is retained on the broker for late subscribers.

topic: string

The topic where to publish this message to.

Generated using TypeDoc