How can you create a new queue programmatically using the MQQueueManager and MQQueue objects?
Is there a guide on how to use these classes? The javadocs don’t say much.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To create a dynamic queue, you just open a model queue. The dynamic queue is created and you get back a handle to it. The name of the queue is provided as well and you can place that in the Reply-To-Queue field of a request message.
If you want to create a permanent queue, have a look at
com.ibm.mq.pcfin the Infocenter. To execute any WMQ admin command from an application, submit a Programmable Command Format (PCF) message to theSYSTEM.ADMIN.COMMAND.QUEUE. The application must be authorized to put a message onto the queue for this to work. Furthermore, the command server will use the user ID in the message header to look up authorizations for the specific command being executed. To create a queue, the submitter must have+crtauthority on queues.Note that any person or app with the ability to create a permanent queue is a defacto administrator. If their ID is not authorized to create authorization control list entries, they need only to create an alias over the command queue and can then spoof the administrative user ID. For this reason, it is rare that any non-administrator would be granted rights to create queues.