I am using Oracle Service Bus(OSB) as the MOM, and the destination URI is a IBM MQ queue. I just want to know which would be the preferred transport. OSB provides 2 adapters for the same, JMS adapter and MQ adapter for transport. Does any one knows what are the PROS and CONS of the same. TIA
JMS is the specification provided by Sun for messaging. MQ Queue is the IBM's implementation of JMS. Similary JBoss has its own implementation. JMS Queue is the generic term.
The Java Message Service (JMS) transport in WSO2 Enterprise Integrator(WSO2 EI) allows you to easily send and receive messages to queues and topics of any JMS service that implements the JMS specification.
This section describes the support for the Java™ Message Service transport protocol using SOAP and non-SOAP message formats. For additional information about limitations of the JMS protocol, see Limitations of the JMS Transport protocol.
The JMS specification defines a set of interfaces that applications can use to perform messaging operations. From IBM MQ 8.0, the product supports the JMS 2.0 version of the JMS standard.
Typically, sending messages via the native MQI interface will be faster than using JMS. In reality I doubt you will see a real difference, unless you are sending tons of messages per day. However, there are other things to consider than just speed. For example, if you are not familiar with MQI applications the learning curve will be steeper than JMS.
JMS header information is mapped to an MQRFH2 header when sent to another JMS destination via MQ. The inclusion of a MQRFH2 header is driven off of the Destination object you create. If the destination is a JMS endpoint then the header is included.
I have included a link below that explains how the fields are mapped:
In reality, unless you are sending millions of messages a day I would assume that the performance of JMS on WebsphereMQ will be more than adequate for your needs. As far as thread blocking goes in request reply I don't think you need to worry about this. By default the reply in WebsphereMQ is consumed by a seperate thread, not the requesting thread.
Just wanted to add what I found that worked for me. You have to do the following when you create your Queue instance.
Queue queue = queueSession.createQueue("queue:///" + queueName + "?targetClient=1");
//Send w/o MQRFH2 header (i.e. receiver is not a JMS client but just MQ)
The inclusion of the "?targetClient=1" causes the raw message to be sent w/o a header.
Hope this helps someone. Mark
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With