A JMS bridge link receives messages in the order sent by the link's source JMS provider and transfer them in the same order to the link's target JMS provider. A link follows this sequence to transfer each message:
The link receives a JMS message from its source.
The link checks the JMSExpiration header to determine whether the message has expired. If it has, a log message is generated, the JMS message is sent to the DMQ, and no further action is taken.
If the message has a JMSReplyTo header and the link target's retain-replyto attribute is false, the JMSReplyTo header value is set to null.
If the link target has defined a message transformer, the transformer's MessageTransformer.transform() method is called. If the call fails or if the message transformer returns a null value, a log message is generated and then processing continues as follows:
In Message Queue 4.4, the untransformed message is sent to the DMQ and processing continues on the untransformed message.
In Message Queue 4.4 Update 1, if the target's consume-no-transfer-on-transform-error XML attribute is true, the untransformed message is sent to the DMQ, consumed from the source, but not sent to the target.
In Message Queue 4.4 Update 1, if the target's consume-no-transfer-on-transform-error XML attribute is false, the link is stopped and the message is neither consumed from the source nor sent to the target.
Beginning with Message Queue 4.4 Update 1, if the message-transfer-tag-bridge-name attribute of the jmsbridge element is true, the JMS_SUN_JMSBRIDGE_NAME property is added to the message and set to the name of the bridge.
The message is sent to the link target's destination with a timeToLive value based on the JMSExpiration header and current GMT time and with the same JMSDeliveryMode and JMSPriority values as the original message. If sending to the link target's destination fails and the link is not transacted, a log message is generated, the JMS message is sent to the DMQ, and processing continues.
The source message is acknowledged using JMS CLIENT_ACKNOWLEDGE if the link is not transacted. If the acknowledgement fails, a log message is generated and the JMS message is sent to the DMQ.
Beginning in Message Queue 4.4 Update 1, if the message processing was successful, an INFO log message is generated.
Message processing for messages across transacted links follows the same processing sequence, except JTA interfaces are used to coordinate the source and target resource managers to transfer the message in an XA distributed transaction. For transacted links, failure to send the message to the link target's destination does not cause the JMS message to be sent to the DMQ; instead, the transaction is rolled back. However, if the attempt to commit the transaction fails, a log message is generated and the JMS message is sent to the DMQ.
The quality of message transfer under failures depends on whether the link transferring the message is transacted:
Transacted links: once-only-once
Non-transacted links: at-least-once