Division of message content between xml and message headers
The basic principle in the Bit Repository is that all information needed for the receiving party will be contained within the xml body of the broker messages, which is, in JMS/NMS terms a text message.
Additionally some data elements may be repeated in message header/property fields for convenience and queue operation, such as the use of selectors. Data which might be considered confidential should not appear in message headers.
Currently the following message elements are proposed to be transmitted in the header as well as in the message xml:
Protocol element | JMS header/property | NMS header/property |
---|---|---|
CorrelationID | JMSCorrelationID | NMSCorrelationID |
Destination | JMSDestination | NMSDestination |
ReplyTo | JMSReplyTo | NMSReplyTo |
Message type (Root element) | org.bitrepository.messages.type | org.bitrepository.messages.type |
CollectionID | org.bitrepository.messages.collectionid | org.bitrepository.messages.collectionid |
To | org.bitrepository.messages.to | org.bitrepository.messages.to |
org.bitrepository.messages.signature | org.bitrepository.messages.signature |
If data is both found in the header and the body, the header values should be used. This means that if the data is inconsistent, the information found in the header needed by ActiveMQ will be used. Note that this is only valide for this concrete ActiveMQ based architecture, other architectures may use the body values.