Create dynamic queues

 

Use a dynamic queue when you do not need the queue after your application ends. For example, you could use a dynamic queue for your reply-to queue. You specify the name of the reply-to queue in the ReplyToQ field of the MQMD structure when you put a message on a queue (see Defining messages using the MQMD structure).

To create a dynamic queue, you use a template known as a model queue, together with the MQOPEN call. You create a model queue using the WebSphere MQ commands or the operations and control panels. The dynamic queue that you create takes the attributes of the model queue.

When you call MQOPEN, specify the name of the model queue in the ObjectName field of the MQOD structure. When the call completes, the ObjectName field is set to the name of the dynamic queue that is created. Also, the ObjectQMgrName field is set to the name of the local queue manager.

We can specify the name of the dynamic queue that you create in three ways:

For more information about these methods, see the description of the DynamicQName field in the Application Programming Reference.

There is more information on dynamic queues in Dynamic queues.

 

Parent topic:

Opening and closing objects


fg12280_