ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » <SOLVED> Using a replytoqueue and replytoqueuemanager

Post new topic  Reply to topic
 <SOLVED> Using a replytoqueue and replytoqueuemanager « View previous topic :: View next topic » 
Author Message
James_O_K
PostPosted: Wed Apr 26, 2006 6:30 am    Post subject: <SOLVED> Using a replytoqueue and replytoqueuemanager Reply with quote

Apprentice

Joined: 09 Mar 2006
Posts: 39
Location: UK

Hello all,

I'm new to using java with MQ series and need a little help on something.

I have written a listener application that picks up a message from a queue, does some processing and then puts a reply message back to the sender.

The request message has a replyToQueueName and replyToQueueManager name specified that I have to use when replying.

What I dont understand (even after reading a fair amount) is how I get a handle on the queue on a remote queue manager to put the reply message. At the moment my code looks like this

getQueue.get(message, getMessageOptions);

-- do some other processing

-- setup a return message

putQueue = queueManager.accessQueue(message.replyToQueueName, putOpenOptions, message.replyToQueueManagerName, null, null);

At the point of queueManager.accessQueue I get an exception with MQRC 2087 - UNKNOWN REMOTE QUEUE MANAGER.

So really I would like to understand how my local qmgr should know about the remote qmgr (should they be clustered for example?) and if I have got the wrong end of the stick.

The reply to queue name looks like this

INF.QMGRNAME.SWTNAME.BEB3883632779187

which I am assuming is a dynamic queue thats been generated.

Any help highly appreciated!

Thanks
James.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 26, 2006 6:41 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Does the queue manager have a transmit queue with the name of the remote queue manager name, or some suitable alias?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
James_O_K
PostPosted: Wed Apr 26, 2006 6:47 am    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2006
Posts: 39
Location: UK

Vitor wrote:
Does the queue manager have a transmit queue with the name of the remote queue manager name, or some suitable alias?


Hi,

No it doesnt. I have only 1 xmit queue. The replyToQueueManager is called CSQF.

Do I need to setup a xmit queue called this with all channels associated too?

James.
Back to top
View user's profile Send private message
wschutz
PostPosted: Wed Apr 26, 2006 6:59 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Quote:
Do I need to setup a xmit queue called this with all channels associated too?
Yes, either that or use clustering. When you specify a queueName and qMgrName when opening a queue, MQ has to find a path back for that qmgrName (acutally, until the message arrives at the destination qmgr, the queueName is "ignored"). So you either need to setup clustering so that your local qmgr knows how to route the message back, or you need a xmitq that matches the queueMgrName (you could use qmgr alias's, but for now we'll keep it simple).
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Vitor
PostPosted: Wed Apr 26, 2006 7:04 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

In short, yes.

In long - when you do a put to a non-local queue manager, the message needs to be routed to it's destination. Given the format of the reply to queue name I'm guessing it's a dynamic queue and as such there's no remote queue definition on your local qmgr. Hence it needs to do the next best thing, i.e. find the reply to queue manager, punt the message at it & let it find the queue (or the dead letter queue if it fails to!).

The mechanism for this is to send the message down an xmit queue named for the reply to qmgr, in the expectation that the qmgr can be found there. Now it might be an xmitq, or an alias to another qmgr who does know how to find it, but if there no way of locating the qmgr you get the error you've experienced.

Now to business. In your current setup how do messages pass from this CSQF (a mainframe I think) to your local qmgr, and how would you expect the replies to pass back? Your problem is that the "put" opperation is not identifiying this reply mechanism.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
James_O_K
PostPosted: Wed Apr 26, 2006 8:04 am    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2006
Posts: 39
Location: UK

wsuchtz/Vitor,

I am gathering from this that I have to set up a transmit queue that points at the CSQF queue manager. This means I am going to need to get the rcvr channel created at the other end before I can do my stuff?

Vitor - to answer your question, the message starts off on a windows machine and gets routed via a couple of routing programs to end up on my local queue.

Having not worked with dynamic queues before I was expecting the replies to be posted to a remote queue def on my local qmgr and be dealt with in that way. After doing some reading/getting feedback from you guys it looks as if I need to do an queuemanager.accessqueue() using the name of the remote qmgr and remote queue. But prior to doing that I need to get the xmitq setup with name of CSQF.
Back to top
View user's profile Send private message
wschutz
PostPosted: Wed Apr 26, 2006 8:10 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Quote:
am gathering from this that I have to set up a transmit queue that points at the CSQF queue manager. This means I am going to need to get the rcvr channel created at the other end before I can do my stuff?
On your end, you need a XMITQ and sender channel. On the zOS side, a receiver channel with the same name as your sender channel. Search here for how to trigger channels, there was recently a thread about doing just that.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
James_O_K
PostPosted: Wed Apr 26, 2006 8:23 am    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2006
Posts: 39
Location: UK

wschutz wrote:
Quote:
am gathering from this that I have to set up a transmit queue that points at the CSQF queue manager. This means I am going to need to get the rcvr channel created at the other end before I can do my stuff?
On your end, you need a XMITQ and sender channel. On the zOS side, a receiver channel with the same name as your sender channel. Search here for how to trigger channels, there was recently a thread about doing just that.


Great, going to give it a go first thing tomorrow.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 26, 2006 3:03 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

James_O_K wrote:
wschutz wrote:
Quote:
am gathering from this that I have to set up a transmit queue that points at the CSQF queue manager. This means I am going to need to get the rcvr channel created at the other end before I can do my stuff?
On your end, you need a XMITQ and sender channel. On the zOS side, a receiver channel with the same name as your sender channel. Search here for how to trigger channels, there was recently a thread about doing just that.


Great, going to give it a go first thing tomorrow.

You should as well read the section about multihopping in the intercommunications manual.
What Wayne and Vito told you is that you need to find a default path/way from your qmgr to the replyto qmgr. That path may be direct or indirect(multi hop). If it is indirect you will most certainly need to set up a qmgr alias. And remember for the message to arrive to destination the whole path needs to be mapped as a default path on each hop.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
James_O_K
PostPosted: Fri Apr 28, 2006 10:37 pm    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2006
Posts: 39
Location: UK

OK, Ive done what you suggested and its now solved the problem. Ive also got my hands on some useful MQ Series documentation.

Thanks for all your help.

James.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Apr 29, 2006 4:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Would you mind editing your first post in this thread and putting "[solved]" in front of the subject ?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
James_O_K
PostPosted: Sun Apr 30, 2006 11:08 am    Post subject: Reply with quote

Apprentice

Joined: 09 Mar 2006
Posts: 39
Location: UK

fjb_saper wrote:
Would you mind editing your first post in this thread and putting "[solved]" in front of the subject ?

looks as though someone has done that for me!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » <SOLVED> Using a replytoqueue and replytoqueuemanager
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.