Author |
Message
|
Sam Uppu |
Posted: Tue Nov 11, 2008 7:07 pm Post subject: Is it must to provide the QMgrName while putting a msg to Q |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
Hi Guys,
I have 3 QMgrs in a cluster called CLUSTER1.
The QMgrs are...QM1, QM2 and QM3.
QM1 & QM2 are full repositories in the cluster.
There is a cluster queue, CLUSTERQ defined on both QM1 & QM2.
The application is running on QM3 and trying to put the msg onto cluster queue, CLUSTERQ.
Question:
Is it must to provide the QMgrName while putting(writing) a msg to a cluster queue. a fyi..We are not going with default queue managers.
Thanks for your suggestions and tips.
Sam |
|
Back to top |
|
 |
AkankshA |
Posted: Tue Nov 11, 2008 7:43 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
No...
for the fact.. if you want to use load balancing.. you should never specify qmanager name where q is hosted physically..
your application is connecting to QM3 and CLUSTERQ
so you would specify QM3/CLUSTERQ
in case its a JMS binding.. you should not specify any name for QM.. _________________ Cheers |
|
Back to top |
|
 |
Sam Uppu |
Posted: Tue Nov 11, 2008 7:53 pm Post subject: |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
AkankshA wrote: |
No...
for the fact.. if you want to use load balancing.. you should never specify qmanager name where q is hosted physically..
your application is connecting to QM3 and CLUSTERQ
so you would specify QM3/CLUSTERQ
in case its a JMS binding.. you should not specify any name for QM.. |
The application is using Binding mode in connecting to QMgr..QM3.
Normally when we put a msg with amqsput, we need to provide the QMgrName. Without QMgrName the amqsput is not going work. How the app program is different to a amqsput?.
We are trying to test round robin functionality. Whether we need to provide the QMgrName-QM3 or not as the application is connected to QM3 and trying to put the msg to clusterQ.
Let me know your thoughts.
Thanks.
Sam. |
|
Back to top |
|
 |
AkankshA |
Posted: Tue Nov 11, 2008 8:04 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
in you application you shall specify QM3 else how ll it coem to know which QM to connect
while creating binding file you need not give the qmgr name... since the q does not exist physically on the connecting QM.. MQ ll take care of name resolution... _________________ Cheers |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Nov 11, 2008 9:06 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Use some tool like MO71 to put the message. It is easier that way. You will have to clear the qmgr name and replace the queue name before putting the message the first time... Trying to put a message to any queue in the queue list should get you to the override screen. Have fun  _________________ MQ & Broker admin
Last edited by fjb_saper on Wed Nov 12, 2008 2:17 pm; edited 1 time in total |
|
Back to top |
|
 |
samsam007 |
Posted: Tue Nov 11, 2008 9:48 pm Post subject: |
|
|
 Centurion
Joined: 30 Oct 2008 Posts: 107
|
AkankshA wrote: |
in you application you shall specify QM3 else how ll it coem to know which QM to connect
while creating binding file you need not give the qmgr name... since the q does not exist physically on the connecting QM.. MQ ll take care of name resolution... |
Is *binding file* only applicable to JMS?
My enviornment is .Net (C#), can I still use *binding file*?
Regards |
|
Back to top |
|
 |
samsam007 |
Posted: Tue Nov 11, 2008 10:00 pm Post subject: |
|
|
 Centurion
Joined: 30 Oct 2008 Posts: 107
|
AkankshA wrote: |
in you application you shall specify QM3 else how ll it coem to know which QM to connect
while creating binding file you need not give the qmgr name... since the q does not exist physically on the connecting QM.. MQ ll take care of name resolution... |
I thought a Qmgr name must be inserted in the binding file as well? |
|
Back to top |
|
 |
AkankshA |
Posted: Tue Nov 11, 2008 10:17 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
samsam007 wrote: |
AkankshA wrote: |
in you application you shall specify QM3 else how ll it coem to know which QM to connect
while creating binding file you need not give the qmgr name... since the q does not exist physically on the connecting QM.. MQ ll take care of name resolution... |
I thought a Qmgr name must be inserted in the binding file as well? |
not when your queue managers are in cluster _________________ Cheers |
|
Back to top |
|
 |
samsam007 |
Posted: Tue Nov 11, 2008 10:22 pm Post subject: |
|
|
 Centurion
Joined: 30 Oct 2008 Posts: 107
|
AkankshA wrote: |
samsam007 wrote: |
AkankshA wrote: |
in you application you shall specify QM3 else how ll it coem to know which QM to connect
while creating binding file you need not give the qmgr name... since the q does not exist physically on the connecting QM.. MQ ll take care of name resolution... |
I thought a Qmgr name must be inserted in the binding file as well? |
not when your queue managers are in cluster |
I also struggle looking for an example about how to use binding file for external application connect to a Cluster .
Is there any example available?
Thanks |
|
Back to top |
|
 |
AkankshA |
Posted: Tue Nov 11, 2008 10:31 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
samsam007 wrote: |
AkankshA wrote: |
in you application you shall specify QM3 else how ll it coem to know which QM to connect
while creating binding file you need not give the qmgr name... since the q does not exist physically on the connecting QM.. MQ ll take care of name resolution... |
Is *binding file* only applicable to JMS?
My enviornment is .Net (C#), can I still use *binding file*?
Regards |
As far as i know.. binding file is for JMS only _________________ Cheers |
|
Back to top |
|
 |
Sam Uppu |
Posted: Wed Nov 12, 2008 6:43 am Post subject: |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
AkankshA wrote: |
in you application you shall specify QM3 else how ll it coem to know which QM to connect
while creating binding file you need not give the qmgr name... since the q does not exist physically on the connecting QM.. MQ ll take care of name resolution... |
We are not using JMS. We are using Java. While connecting to QMgr, we are using Binding mode(not client connection) as the MQ server and application running on the same physical server.
As we are not using JMS, we dont have Binding file.
The application is connecting to QM3 to send a msg to cluster queue, CLUSTERQ(which resides on QM1 & QM2).
As we dont have binding file, we need to provide the QMgr name in our Java code while placing the msg to Cluster queue, CLUSTERQ..Please confirm?.
Thanks much |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Nov 12, 2008 6:58 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9472 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
Is it must to provide the QMgrName while putting(writing) a msg to a cluster queue? |
No. Your application must MQCONNected to a qmgr. After MQCONNect, the application usually MQOPENs a queue definition (QLocal or QRemote) that identifies the queuename, the qmgrame, the cluster the queue belongs to. The MQOPEN identifies which xmit queue (if the cluster queue is remote) the message should be MQPUT to.
amqsput is an IBM-supplied application that needs to know which qmgr to MQCONNect, and to which queue to MQPUT to. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Sam Uppu |
Posted: Wed Nov 12, 2008 7:37 am Post subject: |
|
|
 Yatiri
Joined: 11 Nov 2008 Posts: 610
|
bruce2359 wrote: |
Quote: |
Is it must to provide the QMgrName while putting(writing) a msg to a cluster queue? |
No. Your application must MQCONNected to a qmgr. After MQCONNect, the application usually MQOPENs a queue definition (QLocal or QRemote) that identifies the queuename, the qmgrame, the cluster the queue belongs to. The MQOPEN identifies which xmit queue (if the cluster queue is remote) the message should be MQPUT to.
amqsput is an IBM-supplied application that needs to know which qmgr to MQCONNect, and to which queue to MQPUT to. |
Thanks for the info.... |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Nov 12, 2008 10:45 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
amqsput(c) also allows you to specify the QM name to be used for the MQOPEN call.
Code: |
/* */
/********************************************************************/
/* */
/* AMQSPUT0 has the following parameters */
/* required: */
/* (1) The name of the target queue */
/* optional: */
/* (2) Queue manager name */
/* (3) The open options */
/* (4) The close options */
/* (5) The name of the target queue manager */
/* (6) The name of the dynamic queue */
/* */ |
#2 is the QM name used in the MQCONN call.
#5 is the QM name used in the MQOPEN call
i.e.
Code: |
AMQSPUTC LOCAL.QUEUE.ON.THAT.QM MYQM 16 0 THATQM |
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|