Division of message content between xml and message headers

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 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

Toorg.bitrepository.messages.toorg.bitrepository.messages.to

CMS (PKCS#7) Signature

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.