This documentation is for WSO2 Message Broker 3.0.0. View documentation for the latest release.
Due to a known issue do not use JDK1.8.0_151 with WSO2 products. Use JDK 1.8.0_144 until JDK 1.8.0_162-ea is released.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Open the qpid-virtualhosts.xml file from the <MB_HOME>/repository/conf/advanced directory.
  2. Add a queue by adding a new code block under <queues>. See the following example, where a durable queue by the name of 'my-simple-queue' is added.

    Code Block
    <queue>
       <name>my-simple-queue</name>
       <my-simple-queue>
          <exchange>amq.direct</exchange>
          <durable>true</durable>
       </my-simple-queue>
    </queue>

    Given below are the descriptions of the elements used above.

    • <queue>: This is the container element that holds the queue definition.
    • <name>: This element is used to give a name for the queue. In this example, it is 'my-simple-queue'.
    • <my-simple-queue>: Once you define the queue name using the <name> element, you must open another element using the queue name as illustrated in this example. 
    • <exchange>: Queues created in the broker will communicate with external clients through an exchange definition. This element should be set to amq.direct.
    • <durable>: This is also a mandatory element, which specifies that the queue should be durable.
  3. Optionally, you can enable the following properties under the <queues> element by giving appropriate values:

    Element NameDescription
    <maximumQueueDepth>Defines the maximum number of messages that can be kept in the internal queue buffer for delivery. You can disable the parameter by setting it to 0.
    <maximumMessageSize>The maximum size, in bytes, of the messages that can be kept in the queue. You can disable the parameter by setting it to 0.
    <maximumMessageAge>The maximum duration of time a message can be kept in the broker A message will be dropped when it has been kept for the time duration specified. You can disable the parameter by setting it to 0.
    <maximumMessageCount>The maximum message count of a queue. You can disable the parameter by setting it to 0.
  4. You must now add an exchange configuration corresponding to the amq.direct exchange that you used when defining the queue.

    Code Block
    <exchange>
       <type>direct</type>
       <name>amq.direct</name>
       <durable>true</durable>
    </exchange>
  5. Save the information.
  6. Start the server and log in to the management console.
  7. You can now view and manage the 'my-simple-queue' queue from the management console. See the section below on viewing queues for more information.

...