Certain information must be accessible to the message bus in order to route the messages and for the clients and pillars to distinguish messages. On the other hand, for confidentiality and integrity reasons it is desirable that most information is exchanged within the signed and possibly encrypted xml in the message body.
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/XML field |
JMS header/property |
NMS header/property |
---|---|---|
correlationID |
JMSCorrelationID |
NMSCorrelationID |
To |
JMSDestination |
NMSDestination |
ReplyTo |
JMSReplyTo |
NMSReplyTo |
(root element - message type) |
org.bitrepository.messages.type |
org.bitrepository.messages.type |
BitRepositoryCollectionID |
org.bitrepository.messages.collectionid |
org.bitrepository.messages.collectionid |
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.