Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting to a queue without specifying the queue manager name

I am new to MQ.. I have a requirement. Can I connect to a particular queue, using java, on a server without specifying the queue manager name? I have all the details like host name, port number, request, response queue name etc.,

Thanks

like image 917
Ishu Gupta Avatar asked Sep 12 '12 17:09

Ishu Gupta


People also ask

What is the difference between queue and queue manager?

Each queue belongs to a single queue manager and is said to be a local queue to that queue manager. The queue manager to which an application is connected is said to be the local queue manager for that application. For the application, the queues that belong to its local queue manager are local queues.

How do I set the default queue manager in MQ?

Procedure. To create a default queue manager, use the crtmqm command with the -q flag. Indicates that this queue manager is the default queue manager. Is the name of the default transmission queue to be used by this queue manager.

What is the role of queue manager?

A queue manager manages the resources associated with it, in particular the queues that it owns. It provides queuing services to applications for Message Queuing Interface (MQI) calls and commands to create, modify, display, and delete IBM® WebSphere® MQ objects.


1 Answers

Yes. If the app specifies the QMgr name, then the name specified must actually match the QMgr connected to. However, if the app leaves the QMgr name blank, then whatever QMgr responds on that host, port and channel is accepted.

For example, if you define a managed object it might look like this:

DEFINE  CF(JMSDEMOCF) +
        SYNCPOINTALLGETS(YES) +
        TRAN(client) +
        HOST(127.0.0.1) CHAN(MYAPP.SVRCONN) PORT(1414) +
        QMGR( )

If not using JNDI, omit the environment hashtable entry for the QMgr name.

like image 153
T.Rob Avatar answered Sep 30 '22 10:09

T.Rob