Broker's message format
it defines a broker message and provides the serialize() method
a broker messages consists of:
- the header, which is the same for all the messages
and includes the message's type
- a body, which is specific for each type of messages
no de-serialize method needed
- the header is de-serialized first to obtain the type of message
- then the body is de-serialized using the corresponding class
Broker's message header
broker messages include a Header used to identify
the message being sent and to be able to identify the deserializer
This header needs to be used for all application versions
Changing it implies that all the services need to be updated
these messages are wrapped in an ActiveMQTextMessage which includes, among others, the following parameters
- commandId
- responseRequired = false
- messageId
- originalDestination = null
- originalTransactionId = null
- producerId
- destination = topic://heartbeat
- expiration = 1598549182120 (time to live(5000) added to the time stamp
- timestamp = 1598549177120
- type = null
- priority = 4
- groupID = null