Defining a local queue with DEFINE QLOCAL
For an application, the local queue manager is the queue manager to which the application is connected. Queues managed by the local queue manager are said to be local to that queue manager. You use the MQSC command DEFINE QLOCAL to create a local queue.
Before you begin
Note: The steps in this task require you to run MQSC commands. How you do this varies by platform. See Administering IBM® MQ using MQSC commands.
About this task
You use the MQSC command DEFINE QLOCAL to create a local queue. You can also use the default defined in the default local queue definition, or you can modify the queue characteristics from those of the default local queue.
Note: The default local queue is named SYSTEM.DEFAULT.LOCAL.QUEUE and it is created on system
installation.
Procedure
To create a local queue, enter the DEFINE QLOCAL command as shown in the
following example.
In this example, the DEFINE QLOCAL command defines a queue called
ORANGE.LOCAL.QUEUE with these characteristics:
- It is enabled for gets, enabled for puts, and operates on a priority order basis.
- It is an normal queue; it is not an initiation queue or transmission queue, and it does not generate trigger messages.
- The maximum queue depth is 5000 messages; the maximum message length is 4194304 bytes.
DEFINE QLOCAL(ORANGE.LOCAL.QUEUE) +
DESCR('Queue for messages from other systems') +
PUT(ENABLED) +
GET(ENABLED) +
NOTRIGGER +
MSGDLVSQ(PRIORITY) +
MAXDEPTH(5000) +
MAXMSGL(4194304) +
USAGE(NORMAL)
Notes:
- With the exception of the value for the description, all the attribute values shown in the example are the default values. These examples are included for illustration purposes. You can omit them if you are sure that the defaults are what you want or have not been changed. See also Displaying default object attributes with DISPLAY QUEUE.
- USAGE(NORMAL) indicates that this queue is not a transmission queue.
- If you already have a local queue on the same queue manager with the name ORANGE.LOCAL.QUEUE, this command fails. Use the REPLACE attribute if you want to overwrite the existing definition of a queue, but see also Changing local queue attributes with ALTER QLOCAL or DEFINE QLOCAL.