Actionable transport headers
Principle
A consumer can make high-level decisions on the basis of a message’s metadata, without processing the message and inspecting its contents
Description
Regardless of the transport mechanism for messages (e.g. a queue, topic or virtual topic, smtp, etc) the consumer should be able to make high-level decisions on the basis of a message’s metadata, without processing the message and inspecting its contents.
The minimum required headers are:
correlationIdmessageTypeschemaVersionsequenceNumber
Consequences
- A publisher will add the
messageTypeheader to all emitted messages - Naming conventions will be followed for
messageTypeheaders across the software estate - A publisher will add the required headers but may omit sequenceNumber etc. if it is not implemented yet
Example
Any message would contain headers for:
correlationId: 97f81df5-4339-42aa-9dcb-a8d278ebeee1messageType: REGISTRATION_NUMBER_UPDATED_EVENTsequenceNumber: 98765schemaVersion: 1.4
References
See this reference from Oracle on built-in JMS headers.