ActiveMQ supports the AMQP 1.0 protocol which is an OASIS standard.

Availability
Available from ActiveMQ version 5.8 onwards.

Enabling the ActiveMQ Broker for AMQP

Its very easy to enable ActiveMQ for AMQP. Just add a connector to the broker using the amqp URL.

<transportConnectors>
   <transportConnector name="amqp" uri="amqp://0.0.0.0:5672"/>
</transportConnectors>

It is enabled in the default ActiveMQ server configuration.

For more help see Run Broker.

Security

The AMQP implementation fully supports an ActiveMQ security mechanism. This means that the broker accepts plain SASL authentication. Also, the authorization policies will be applied when you try to access (read/write) certain destinations.

SSL
For additional security, you can use AMQP over SSL as described in the following section.

Enabling AMQP over NIO

For better scalability (and performance) you might want to run the AMQP protocol over the NIO transport. To do that just use amqp+nio transport prefix instead of amqp. For example, add the following transport configuration in your XML file:

     <transportConnector name="amqp+nio" uri="amqp+nio://localhost:5672"/>

This transport uses the NIO transport underneath and will generally use much less threads than the standard connector. This connector can help if you want to use large number of queues

Enabling AMQP over SSL

It's easy to configure ActiveMQ to use AMQP over a SSL connection. All you have to do is use the amqp+ssl transport prefix instead of amqp. For example, add the following transport configuration in your XML file:

     <transportConnector name="amqp+ssl" uri="amqp+ssl://localhost:5671"/>
  • For more details on using SSL with ActiveMQ, see the following article (How do I use SSL).

Working with Destinations with AMQP

You should prefix destination address with `queue://` to use Queue based destinations or `topic://` to use topic based destinations. If an AMQP address is used without the prefix, it will be used as a Queue.

Mapping to JMS

There are three basic conversion strategies that can be used with AMQP and interoperating with the JMS API.

StrategyDescription
nativeDefault Wraps the bytes of the AMQP message into a JMS BytesMessage and
also maps the headers of the AMQP message to headers on the JMS message
rawWraps the bytes of the AMQP message into a JMS BytesMessage
jmsMaps headers of the AMQP message to JMS message headers and maps the
body of the AMQP message to JMS body

Set the transformer transport option on the transportConnector to the desired mapping strategy. For example, to interoperate with JMS at the payload level, set the transformer option to jms

     <transportConnector name="amqp" uri="amqp://localhost:5672?transport.transformer=jms"/>

AMQP 1.0 client library

You can use Apache Qpid Proton.

© 2004-2011 The Apache Software Foundation.
Apache ActiveMQ, ActiveMQ, Apache, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram