The subcommand imqcmd create dst creates a new physical destination:
imqcmd create dst -t destType -n destName [ [-o property=value] … ]
You supply the destination type (q for a queue or t for a topic) and the name of the destination. The name must conform to the following rules:
It must contain only alphanumeric characters.
It must not contain spaces.
It must begin with an alphabetic character (A–Z, a–z), an underscore (_), or a dollar sign ($).
It must not begin with the characters mq.
For example, the following command creates a queue destination named XQueue:
imqcmd create dst -t q -n XQueue
The imqcmd create dst command may also optionally include any property values you wish to set for the destination, specified with the -o option. For example, the following command creates a topic destination named hotTopic with a maximum message length of 5000 bytes:
imqcmd create dst -t t -n hotTopic -o maxBytesPerMsg=5000
See Chapter 15, Physical Destination Property Reference for reference information about the physical destination properties that can be set with this option. (For auto-created destinations, you set default property values in the broker’s instance configuration file; see Table 14–3 for information on these properties.)
To destroy a physical destination, use the imqcmd destroy dst subcommand:
imqcmd destroy dest -t destType -n destName
This purges all messages at the specified destination and removes it from the broker; the operation is not reversible.
For example, the following command destroys the queue destination named curlyQueue:
imqcmd destroy dest -t q -n curlyQueue -u admin
You cannot destroy the dead message queue.