6.1. Java JMS Client Compatibility and Interoperability
The MRG Messaging Java JMS client library is compatible with both Java JMS and AMQP. However, there are two limitations you will need to keep in mind:
Java JMS compatibility is defined only at the source code level, and
You will need to follow certain guidelines if you want your programs to work correctly with AMQP clients written in other languages.
Java JMS is an Application Programming Interface (API), not a wire-level messaging standard. Programs written using our Java JMS client library will interoperate with each other and programs written with other AMQP-based Java JMS clients. If you program using only the Java JMS API, your code can also be run on other Java JMS systems if you configure the environment properly using JNDI.
Interoperability with AMQP clients written in other languages is straightforward for simple applications, but there are some issues that you should keep in mind, especially if these clients use features not found in Java JMS:
To declare AMQP queues and bindings for your Java JMS program, it is generally best to use JNDI. This allows you to do many things not directly supported by the Java JMS API, including specifying routing keys whose name differs from the queue name, binding to a given queue with multiple routing keys, declaring properties for the queue, etc. This is discussed in detail in Section 6.2, “Creating and Closing Connections and Sessions with JNDI”
Declare your queues before using them. In Java JMS, a queue is created implicitly if you attempt to read from it, but not if you attempt to publish to it. In AMQP, queues must be explicitly declared.
Make sure the content of your message will make sense to clients written in other languages. Serialized Java objects or maps are not easily processed in other languages.
Make sure that the message-type of your message is correctly declared. By default, the Java JMS client uses byte messages. Other message types are discussed in the Java JMS specification.