Configuring the broker instance

A broker instance is the directory that contains all the configurations and the runtime data, such as logs and data files, that are associated with a broker process. You must create a broker, configure the broker, define a queue, and then start the broker.

Creating a broker instance

To create a broker instance, run the following command.
${ARTEMIS_HOME}/bin/artemis create <BROKER DIR>
Note: It is recommended that you do not create the instance directory under ${ARTEMIS_HOME}.

Configuring the broker instance

Complete the following steps to configure the broker in stance.
  1. Update the broker.xml file under the <BROKER DIR>/etc directory to change the provider URL as tcp://<IP address and port of the ActiveMQ Artemis instance>.
  2. Update the bootstrap.xml under the <BROKER DIR>/etc directory to update the host name under the <web> element.

Defining a queue

To define a new queue, update the broker.xml file under the <BROKER DIR>/etc directory and add the following element.
<address name="<QUEUE_NAME>">
  <anycast>
     <queue name="<QUEUE_NAME>" />
  </anycast>
</address>

Starting and stopping the broker instance

To start the broker instance, run the following command:
<BROKER DIR>/bin/artemis run
To stop the broker instance, run the following command:
<BROKER DIR>/bin/artemis stop