Author |
Message
|
abiram8 |
Posted: Tue Dec 16, 2003 12:16 am Post subject: Connecting to Cluster Queue which is not in the current QM |
|
|
 Master
Joined: 27 Mar 2002 Posts: 207 Location: India
|
Hi,
I want my Java Client to connect to Queue Manager QM1 (Full Repository Manager in host H1) and put msg to Cluster queue which is not in QM1.
The Queue Manager QM2(in host H1) & QM3 (in host H2) (QM2,QM3 Partial Repository Queue Manager ) have a Cluster queue named SHARE.Q
Since QM1 being the Full repository holds information that QM1 and QM2 has cluster queue named "SHARE.Q"
Note: QM1 donot have the cluster queue SHARE.Q
My Client in host of QM1 need to connect to QM1 and have to acess the repository queue (SHARE.Q of QM2 or QM3 depending on network priority )but not its local queue.
The MQPut Option in Java is only for Local queue options
It does not mention how to put message into the cluster queue which is a part of other queue manager.
The ordinary put sample prog always throws the error as "MQJE001: Completion Code 2, Reason 2085"
since it looks for only local queue but my cluster queue (which is in QM2 and QM3 is visible in QM1 being full repository cluster ).
Do you know any sample prog which always look for cluster queue (after connecting to QM1 )or any put message options which can resolve my problem.
MQSeries Using Java PDF does not much speaks about the Put msg option for a cluster queue which is a part of another Queue Manager .
 |
|
Back to top |
|
 |
leongor |
Posted: Tue Dec 16, 2003 3:03 am Post subject: |
|
|
 Master
Joined: 13 May 2002 Posts: 264 Location: Israel
|
An application need not to be concern if some queue in cluster or local ( except opening it only for output ).
It's queue managers work. If you get 2085 this means you have some problem with this queue in a cluster.
Try to create queue alias on QM1 for SHARE.Q and put there message. _________________ Regards.
Leonid.
IBM Certified MQSeries Specialist. |
|
Back to top |
|
 |
vmcgloin |
Posted: Tue Dec 16, 2003 3:51 am Post subject: |
|
|
Knight
Joined: 04 Apr 2002 Posts: 560 Location: Scotland
|
Alternatively, you might be specifying the wrong options on your MQPUT e.g. ObjectQueueManager (or Java equivalent). Try leaving the qmgr blank on the put if you can.
If you can see the clustered queue on the 'java client' qmgr in MQExplorer then there should be nothing wrong with the clustering. (Right-click and try 'Put test message'...)
Cheers,
Vicky |
|
Back to top |
|
 |
abiram8 |
Posted: Tue Dec 16, 2003 4:50 am Post subject: |
|
|
 Master
Joined: 27 Mar 2002 Posts: 207 Location: India
|
Hi guys,
Thanks for Ur inputs.
1) For connecting to Cluster Queue not in the connecting QM (which is Full Repository)
try this option
int openOptions = MQC.MQOO_OUTPUT ;
//Now specify the queue that we wish to open,
//and the open options...
MQQueue system_default_local_queue = qMgr.accessQueue(queue,openOptions,null,null,null);
MQPutMessageOptions pmo = new MQPutMessageOptions();
pmo.options=MQC.MQPMO_NONE;
This worked for me
Thanks
Abiram |
|
Back to top |
|
 |
vmcgloin |
Posted: Tue Dec 16, 2003 5:10 am Post subject: |
|
|
Knight
Joined: 04 Apr 2002 Posts: 560 Location: Scotland
|
Just for comparison, can you show us what you had before (when it was not working)?
Cheers,
Vicky |
|
Back to top |
|
 |
abiram8 |
Posted: Tue Dec 16, 2003 5:17 am Post subject: |
|
|
 Master
Joined: 27 Mar 2002 Posts: 207 Location: India
|
Hi ,
1) My previous option which worked only for local cluster queue
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF |
MQC.MQOO_OUTPUT ;
MQPutMessageOptions pmo = new MQPutMessageOptions();
2) But the Option whih looked for Cluster which is not the part of conneting queue manager is
int openOptions = MQC.MQOO_OUTPUT ;
MQPutMessageOptions pmo = new MQPutMessageOptions();
pmo.options=MQC.MQPMO_NONE;
Regards,
Abiram |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Dec 16, 2003 5:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
abiram8 wrote: |
Hi ,
1) My previous option which worked only for local cluster queue
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF |
MQC.MQOO_OUTPUT ; |
Yes. You can only open local queues for Input. No other kind of queue other than a local queue can be opened for input, for getting.
There's no way to get from a remote queue, no matter what kind of remote queue it is. If it's not local to the queue manager you're connected to, it's write only. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
abiram8 |
Posted: Tue Dec 16, 2003 8:42 pm Post subject: |
|
|
 Master
Joined: 27 Mar 2002 Posts: 207 Location: India
|
Hi,
Do you mean to say that If I have QM1.Q1 in a cluster.
and QM2(is also a part of same cluster in diffrent host (say H2) but does not contain queue Q1 ).
My Java Client in Host H2 which connects to QM2 (which has information about QM1.Q1)
Can Java Client can retrive the message from Q1(Cluster Queue in QM1)
through the Cluster QM2(since Cluster Queue Manager knows about QM1.Q1)
 |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Dec 17, 2003 5:28 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
abiram8 wrote: |
Hi,
Do you mean to say that If I have QM1.Q1 in a cluster.
and QM2(is also a part of same cluster in diffrent host (say H2) but does not contain queue Q1 ).
My Java Client in Host H2 which connects to QM2 (which has information about QM1.Q1)
Can Java Client can retrive the message from Q1(Cluster Queue in QM1)
through the Cluster QM2(since Cluster Queue Manager knows about QM1.Q1)
|
No. Your Java client can not execute a GET against any queue that is not a LOCAL queue on QM2, which it is connected to. If your Java Client wants to retrieve a message from a queue that is local to QM1, your Java client must connect to QM1.
This is true of ALL clients, and ALL MQ applications. There is no way to perform a GET against a REMOTE queue manager. Clustering doesn't change this. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|