How does RV bridge message translation work?

How does RV bridge message translation work?

book

Article ID: KB0087089

calendar_today

Updated On:

Products Versions
TIBCO Enterprise Message Service -
Not Applicable -

Description

Resolution:
The message translation is done in a way that if the RV/RVCM message contains a field named JMSBytes, JMSObject, JMSStream, JMSText, it will be translated as its JMS equivalent: BytesMessage, ObjectMessage, StreamMessage and TextMessage.
For instance, to import a message as a TextMessage, the RV message should contain a single field called "JMSText" with a string value. To import a BytesMessage, the RV message should contain a single field called "JMSBytes" with a TibrvMsg.OPAQUE field value, etc...
If none of these fields is present, the RV/RVCM message is translated to a MapMessage.

However, there is an exception. In order to support old RV5 applications that may send a *unique* field called "DATA", EMS Server was importing and translating to a JMS type message based on the type of the "DATA" field. So, if an RV/RVCM message containing a *single* field called "DATA" with a string type, it would be imported as a TextMessage. If it is an opaque type, it will be translated as a BytesMessage. The important thing to notice is that it is a *single* field called "DATA".

If you have and application which gets messages exported from JMS, and this application expects a "DATA=" tag, there should  not be any issue.

The JMS application creates a MapMessage and adds a field called "DATA", you can add also other fields, and the message will be exported correctly to Rendezvous.

For instance, here is a MapMessage containing two fields "DATA" and "TIME" received with tibrvlisten:

C:\tibrvlisten topic.sample.exported
tibrvlisten: Listening to subject topic.sample.exported
[2007-04-19 10:33:08]: subject=topic.sample.exported, message={JMSHeaders={JMSDeliveryMode=2 JMSPriority=4 JMSTimestamp=1101925988859 JMSMessageID="ID:EMS-SERVER.B5C24D4BC4:1"} JMSProperties={} DATA=[50 opaque bytes] TIME=[14 opaque bytes]}

Please notice that in transports.conf, there are two properties called "export_headers" and "export_properties". By default, they are enabled, which means that the RV message resulting from a JMS export will contain additional nested fields such as JMSHeaders and JMSProperties. If you do not want the RV message to have these fields, you need to set export_headers and export_properties to false.

With these parameters disabled, the RV message received will look like this:

[2007-04-19 10:38:32]: subject=topic.sample.exported, message={DATA=[50 opaque bytes] TIME=[14 opaque bytes]}

Issue/Introduction

How does RV bridge message translation work?