ActiveMQ can be configured to accept requests from any AMQP client that supports the 1.0 version of the protocol. This example shows a simply proton ruby client that sends and receives messages
To run the example you will need the following packages installed, alsa-lib.i686 libXv.i686 libXScrnSaver.i686 qt.i686 qt-x11.i686 qtwebkit-2.2.2-2.fc18.i686, gcc, ruby
On fedora you can install these via the
you will also need the qpid-proton libraries installed, again
lastly you wull have to create the gems
To configure ActiveMQ to accept AMQP client connections you need to add an Acceptor like so:
<acceptor name="proton-acceptor">
<factory-class>org.apache.activemq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="protocol" value="AMQP"/>
<param key="port" value="5672"/>
</acceptor>
Firstly start the server by running the command
Then in a separate window you can run the send ruby script by running the command
You can then receive the message via the receive ruby script by running