This documentation is for WSO2 Enterprise Service Bus version 5.0.0. For the latest ESB, view the latest WSO2 Enterprise Integrator documentation.

All docs This doc
||
Skip to end of metadata
Go to start of metadata

As of WSO2 ESB 4.7.0, the JMS transport supports producing and consuming JMS MapMessage objects, which send a set of name/value pairs.

Producing a MapMessage

To send a MapMessage from a proxy service or API to a queue, construct an XML payload using the PayloadFactor mediator (or another method) in the following structure, and send it to a JMS endpoint:  

<JMSMap xmlns="http://axis.apache.org/axis2/java/transports/jms/map-payload">
    <name1>value1</name1>
    <name2>value2</name2>
    <name3>value3</name3>
</JMSMap>

The JMS sender will then produce the equivalent MapMessage object:

MapMessage message = session.createMapMessage();           
message.setString("name1", "value1");
message.setString("name2", "value2");
message.setString("name3", "value3");

Consuming a MapMessage

When a proxy service receives a JMS MapMessage via a JMS broker, it will convert it to an XML message like this:

<JMSMap xmlns="http://axis.apache.org/axis2/java/transports/jms/map-payload">
    <name1>value1</name1>
    <name2>value2</name2>
    <name3>value3</name3>
</JMSMap>

   


  • No labels