AMQP Overview
The Advanced Message Queuing Protocol (AMQP) is an open internet protocol for business messaging. The specification of the AMQP protocol is available at
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-overview-v1.0-os.html. It defines a binary wire-level protocol that allows for the reliable exchange of business messages between two parties.
In addition to Universal Messaging's own protocol, NSP interfaces are capable of also accepting AMQP connections over TCP sockets, while NSPS interfaces can accept AMQP connections over SSL/TLS for client implementations that support it.
Connecting
In order to connect to a Universal Messaging server using AMQP, your application needs to use an amqp://host:port URL (NSP Interfaces) or amqps://host:port URL (NSPS Interfaces). AMQP connections are treated in the same way as any other connections by the Universal Messaging realm. If the username is present, the Universal Messaging subject is username@hostname, otherwise the subject is <AnonymousUser>@hostname where <AnonymousUser> is configured under Configuration > Protocol AMPQ Config > AnonymousUser.
We recommend you to establish an AMQP JMS connection using the QPID Proton, QPID Legacy or the Swift MQ client libraries and using a SASL plain over TLS connection.
Figure 1: Connection List with an AMQP connection
This way you can define realm and channel / queue ACLs as you would for any Universal Messaging connection. For example, using the one of the JMS Sample applications with AMQP without a username/password to connect to amqp://localhost:10000 will result in a Universal Messaging subject of <AnonymousUser>@localhost.
Publishing
AMQP applications can publish events to channels and queues, which should exist in advance.
Events published via AMQP are fully interoperable with any Universal Messaging subscriber on any client platform supported and can be snooped using the Universal Messaging Enterprise Manager:
Figure 2: Snooping an AMQP message
Subscribing
AMQP applications can subscribe to pre-existing channels and queues.
Temporary Topics and Queues
The Universal Messaging server supports the creation of temporary topics and queues using an AMQP JMS session's createTemporaryTopic() and createTemporaryQueue() methods. Currently only the "delete-on-close" lifetime policy is supported; a Node dynamically created with this lifetime policy will be deleted at the point that the Link which caused its creation ceases to exist.
Transactions over AMQP
Client applications can perform transactional work over AMQP. Universal Messaging implements the local transaction operations defined in the AMQP specification. For example, if an application communicates to the realm server using a JMS AMQP client library (e.g. Apache Qpid JMS client) it can take advantage of the local transaction functionalities defined in the JMS specification.
Note:
We do not currently support the Transactional Acquisition operation defined in the AMQP specification. However, this sets no limitations on using JMS transactions over AMQP.
JMS sample applications over AMQP
The JMS sample applications provided with the distribution of the Universal Messaging server can be configured to communicate over the AMQP protocol.
For more information, see the page
Using the AMQP Protocol in the JMS code examples in the Developer Guide.