5.2. Create and Configure Queues using qpid-config

  • Updated February 2013.
  • Updated April 2013
The qpid-config command line tool can be used to create and configure queues.
The complete command reference for qpid-config is available by running the command with the --helpswitch:
qpid-config --help
When no server is specified, qpid-config runs against the message broker on the current machine. To interact with a message broker on another machine, use the -a or --broker-addr switch. For example:
qpid-config -a server2.testing.domain.com
The argument for the broker address option can specify a username, password, and port as well:
qpid-config -a user1/secretpassword@server2.testing.domain.com:5772
To create a queue, use the qpid-config add queue command. This command takes the name for the new queue as an argument, and [optionally] queue options.
A simple example, creating a queue called testqueue1 on the message broker running on the local machine:
qpid-config add queue testqueue1
Here are the various options that you can specify when creating a queue with qpid-config:

Table 5.1. Options for qpid-config add queue

Options for qpid-config add queues
--passive, --dry-run Removed in MRG 2.3. Don't create the queue, just check that the command syntax is correct.
--alternate-exchange queue name Name of the alternate exchange. When the queue is deleted, all remaining messages in this queue are routed to this exchange. Messages rejected by a queue subscriber are also sent to the alternate exchange.
--durable The new queue is durable. It will be recreated if the server is restarted, along with any undelivered messages marked as PERSISTENT sent to this queue.
--cluster-durable The new queue becomes durable if there is only one functioning node in a cluster.
--file-count integer The number of files in the queue's persistence journal. Up to a maximum of 64. Attempts to specify more than 64 result in the creation of 64 journal files.
--file-size integer File size in pages (64KiB/page).
--max-queue-size integer Maximum in-memory queue size as bytes. Note that on 32-bit systems queues will not go over 3GB, regardless of the declared size.
--max-queue-count integer Maximum in-memory queue size as a number of messages.
--limit-policy [none, reject, flow-to-disk, ring, ring-strict] Action to take when queue limit is reached.
--order [fifo, lvq, lvq-no-browse] Removed in MRG 2.3. Queue ordering policy. This method of declaring Last Value Queues is deprecated. See the updated information on Last Value Queues for instructions on declaring LVQs using arguments.
--generate-queue-events integer If set to 1, every enqueue will generate an event that can be processed by registered listeners (e.g. for replication). If set to 2, events will be generated for both enqueues and dequeues.
--flow-stop-size integer Turn on sender flow control when the number of queued bytes exceeds this value.
--flow-resume-size integer Turn off sender flow control when the number of queued bytes drops below this value.
--flow-stop-count integer Turn on sender flow control when the number of queued messages exceeds this value.
--flow-resume-count Turn off sender flow control when the number of queued messages drops below this value.
--group-header Enable message groups. Specify name of header that holds group identifier.
--shared-groups Allow message group consumption across multiple consumers.
--argument name=value Specify a key-value pair to add to the queue arguments. This can be used, for example, to specify no-local=true to suppress loopback delivery of self-generated messages.
Note that you cannot create an exclusive queue using qpid-config, as an exclusive queue is only available in the session where it is created.