JBoss A-MQ

Download & Installation

Installation

  • Create a new user named amq-broker
# useradd amq-broker
# passwd amq-broker
  • Create the directory /opt/redhat/amq-broker and make the new amq-broker user and group the owners of it.
# mkdir -p /opt/redhat/amq-broker
# chown -R amq-broker:amq-broker /opt/redhat/amq-broker/
  • Change the owner of the archive to the new user.
sudo chown amq-broker:amq-broker jboss-amq-7.0.0.redhat-1-bin.zip
  • Move the installation archive to the directory you just created.
# sudo mv jboss-amq-7.0.0.redhat-1-bin.zip /opt/redhat/amq-broker/
  • As the new user amq-broker, extract the contents of the archive
unzip jboss-amq-7.0.0.redhat-1-bin.zip

Hello World

Quick Install

unzip jboss-amq-7.0.0.redhat-1-bin.zip

Create a broker instance.

<install-dir>/bin/artemis create testbroker

Start and Stop the broker instance.

  • Start
./testbroker/bin/artemis run
  • Entry Ctrl + C to stop

Examples

queue

  • add exampleQueue to testbroker, edit ./testbroker/etc/broker.xml add the following contents
     <addresses>
         ...
         <address name="TestQueue">
            <anycast>
               <queue name="exampleQueue" />
            </anycast>
         </address>
         ...
      </addresses>
    </core>
</configuration>