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 API Support » using replytoqueue

Post new topic  Reply to topic
 using replytoqueue « View previous topic :: View next topic » 
Author Message
Maverick2
PostPosted: Wed Sep 05, 2007 4:12 am    Post subject: using replytoqueue Reply with quote

Newbie

Joined: 05 Sep 2007
Posts: 4

hi, I'm new to MQ messaging and one of the first tasks I've been asked to do involves using replytoqueue queue, which I'm not quite sure about how it works. What I'm trying to do is as below.

We have 2 queue managers, QM1 and QM2, in two different machines. A process running on QM1 machine sends requests messages to a local queue in QM2. My little application runs on QM2 machines and it should receive messages from QM1, process it, generate a response message and send that response back to QM1. Response should be sent to the queue defined in replytoqueue in message descriptor.

When I want to send the reply, what I'm not clear about is:
- should I connect to QM1 with replytoqueumanager details in message descriptor
- shoudl I open the queue defined in replytoqueue in message descriptor. if so, will it not fail as i do not have a queue definition for queue that is specified in replytoqueue

Basically, I'm not clear about how to do the MQPUT to the queue that is specified in replytoqueue of the message descriptor that I got with MQGET.

Any help on this is greatly appreciated.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 05, 2007 4:19 am    Post subject: Re: using replytoqueue Reply with quote

Grand High Poobah

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

Maverick2 wrote:
When I want to send the reply, what I'm not clear about is:
- should I connect to QM1 with replytoqueumanager details in message descriptor


No

Maverick2 wrote:

- shoudl I open the queue defined in replytoqueue in message descriptor.


Yes

Maverick2 wrote:
if so, will it not fail as i do not have a queue definition for queue that is specified in replytoqueue


No, because you'll specify that the queue in on replytoqmgr. Providing there's a route back to that queue manager (which your administrator should have set up) it will work itself out.

Maverick2 wrote:

Basically, I'm not clear about how to do the MQPUT to the queue that is specified in replytoqueue of the message descriptor that I got with MQGET.


Check out the Application Programming Guide, which describes all this.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Sep 05, 2007 4:29 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What it comes down to is you put stuff into the Object Descriptor that goes to the MQPUT.

And everything else works itself out, without you needing to do anything.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Maverick2
PostPosted: Wed Sep 05, 2007 4:58 am    Post subject: Reply with quote

Newbie

Joined: 05 Sep 2007
Posts: 4

Thanks Vittor, this is in the same line of what I initially think of.

Now my question is how to setup the route back to the originator queue manager. It seems like I have to figure this out by myself as our systems administrator is not around for a while.

Could you please let me know or point me in the right direction in setting this up.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Sep 05, 2007 5:00 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You configure the route TO the replytoqmgr in exactly the same way as you configure the route FROM the replytoqmgr.

Odds are good that your SA has already done this.

Odds are better that your SA will not be pleased to find you've been playing around with his or her toys while he/she was away.

Odds are about the same that your SA has taken steps to ensure that you CAN'T play around with his or her toys whilst he/she is away.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 05, 2007 5:02 am    Post subject: Reply with quote

Grand High Poobah

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

Maverick2 wrote:
Now my question is how to setup the route back to the originator queue manager. It seems like I have to figure this out by myself as our systems administrator is not around for a while.

Could you please let me know or point me in the right direction in setting this up.


If there's a route from your QM1 -> QM2 then I'd be surprised if there's not a route from QM2 -> QM1; if I was the admin I'd have set both up.

Give your application a try & if you get a 2087 (remote queue manager not found) use the Intercommunication manual to set up a pair of channels & xmitqs that mirror the set up from QM1 -> QM2 (but the other way round obviously).

And when the administrator gets back a) tell him what you've done & b) tell him his security sucks big time!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Maverick2
PostPosted: Wed Sep 05, 2007 5:15 am    Post subject: Reply with quote

Newbie

Joined: 05 Sep 2007
Posts: 4

Vitor,

Did you mean channels when you say setting up of routes. Yes, we already have channels setup from QM1 to QM2 and from QM2 to QM1. Does these channels have to be named in any specific way to find out the route automatically.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 05, 2007 5:17 am    Post subject: Reply with quote

Grand High Poobah

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

No, but the queues do. Check the Intercommunication manual.

Or follow my suggestion and try it!

Certainly try it before trying to "set it up" or "fix it"!!!

I must say I'm slightly alarmed that this is in the hands of an application programmer (no offence intended). It's fairly unusual for you to be expected to deal with this, even more unusual (as my estemed associated points out) for it to be possible.

If you change anything, be fairly careful and quite certain in what you're doing.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Maverick2
PostPosted: Wed Sep 05, 2007 5:35 am    Post subject: Reply with quote

Newbie

Joined: 05 Sep 2007
Posts: 4

Ok, I'm going to give it a try now.

As you said, I don't need to connect to the replyqueuemngr. But I need to supply a connection handle when I open the queue. What do I do with that parameter.

I now guess that setting up an route means, setting up the TCP/IP host table entries. If that's so, queue manager name and machine name should be same as message descriptor has only the replyqueuemngr name. How does it work with multiple queue manager on the same machine.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 05, 2007 5:38 am    Post subject: Reply with quote

Grand High Poobah

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

Maverick2 wrote:
Ok, I'm going to give it a try now.

As you said, I don't need to connect to the replyqueuemngr. But I need to supply a connection handle when I open the queue. What do I do with that parameter.

I now guess that setting up an route means, setting up the TCP/IP host table entries. If that's so, queue manager name and machine name should be same as message descriptor has only the replyqueuemngr name. How does it work with multiple queue manager on the same machine.


You have so many concepts confused in this post it's hard to know where to start. If you have this level of understanding (i.e. this much of a newbie) wait until your admin gets back!

Spend some time with the APG & APR, and the Intercommunication manual. Segrigate in your mind the connection of your program and the routing of the messages. Understand why these are separate, understand how this works and then you'll have the answers to those points of yours that are relevant, and understand why the rest are not.

Also speak to your management about some training. MQ is not straightforward & some formal instruction might be a time saver.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Sep 05, 2007 5:42 am    Post subject: Reply with quote

Grand High Poobah

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

Ok, little harsh in the last post maybe

Maverick2 wrote:
As you said, I don't need to connect to the replyqueuemngr. But I need to supply a connection handle when I open the queue. What do I do with that parameter.


Whatever you'd normally do.

Maverick2 wrote:

I now guess that setting up an route means, setting up the TCP/IP host table entries.


No it doesn't

Maverick2 wrote:
How does it work with multiple queue manager on the same machine.


Same way as it does with remote machines
_________________
Honesty is the best policy.
Insanity is the best defence.
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 API Support » using replytoqueue
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.