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 » WebSphere Message Broker (ACE) Support » MQGET node

Post new topic  Reply to topic
 MQGET node « View previous topic :: View next topic » 
Author Message
kirank
PostPosted: Tue Dec 09, 2008 2:03 pm    Post subject: MQGET node Reply with quote

Centurion

Joined: 10 Oct 2002
Posts: 136
Location: California

Hi,

I am using MQGET node in Broker 6.0.2 for a synchronous request/reply web service. The Message flow has
HTTP Input>Compute>MQOutput>MQGET>Compute>HTTPReply nodes. In I am sending a request to back end SAP system using MQ Output node of the flow. The reply for the request is sent back to Reply queue. This Reply queue is being read by MQGET node using Get by CorrelID option. I am setting unique Message Id on each request which gets copied and sent back to Correl Id in reply message.

If the Reply-to Queue is empty this flow works fine. However if there are un processed messages in Reply to Queue, the MQGET node is picking first available message on the Reply to queue rather than doing GET based on correlation Id. I had expected that MQGET node will leave those un processed messages alone and issue a GET call with correlation Id value it is getting from MQ output node.However its not working as expected. Has anybody expereinced this? Am I missing any setting aywhere?

Regards

Kiran
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 09, 2008 2:48 pm    Post subject: Reply with quote

Grand High Poobah

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

Settings you need to check:

  • Make sure the MQOutput node has transaction set to NO.
  • Insert a compute node between the MQOutput Node and the MQGet node.
    The compute node will copy the msgId from the LocalInputEnvironment and set it to the MQMD going into the MQGet node as CorrelID.
  • Make sure the MQGet node has the property get by correlId checked.
  • Make sure the wait intervall on the MQGet node is big enough to allow for a reply to get to the queue listened on by the MQGet node.


Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kirank
PostPosted: Tue Dec 09, 2008 4:19 pm    Post subject: Reply with quote

Centurion

Joined: 10 Oct 2002
Posts: 136
Location: California

Thanks fjb_saper. After adding the compute node after MQ output node it worked. I had all other things set for MQGET including transaction for MQ output as you had mentioned. However the Correlation Id was not getting set in the compute before MQ Output node. I found that using trace so I added the compute node after MQ output to set it.

I am just curious why Correlation Id can't be set before MQ Output. It would avoid the need for an extra compute. Is it becuase of HTTP Input?

Regards

Kiran
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 09, 2008 7:01 pm    Post subject: Reply with quote

Grand High Poobah

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

No it is because on the MQ Output you can say new messageId, new correlationId and such. So of course you need to get that Id from LocalInputEnvironment...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Dec 10, 2008 2:50 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

InputLocalEnvironment, FJ.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 10, 2008 3:35 am    Post subject: Reply with quote

Grand High Poobah

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

mqjeff wrote:
InputLocalEnvironment, FJ.


Thanks Jeff. I shouldn't have trusted my memory....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kirank
PostPosted: Wed Dec 10, 2008 9:55 am    Post subject: Reply with quote

Centurion

Joined: 10 Oct 2002
Posts: 136
Location: California

I have lot of other flows running in production where I can set the Correlation Id in Compute node before the MQ Output node and it works fine. I have not set generate new correlid or message id option on MQ output because I want my own correlid rather than a generated one. I am able to set my own Message Id but not the correlation Id in the compute before MQ output.

The difference with this one is I have HTTP input instead of MQ Input and on the MQ output node I had to set Pass All for context as it was giving me context error. But I think context setting should not interefere with Correlid when message id can be set. Is it a bug?

Regards

Kiran
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 10, 2008 2:34 pm    Post subject: Reply with quote

Grand High Poobah

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

kirank wrote:
I have lot of other flows running in production where I can set the Correlation Id in Compute node before the MQ Output node and it works fine. I have not set generate new correlid or message id option on MQ output because I want my own correlid rather than a generated one. I am able to set my own Message Id but not the correlation Id in the compute before MQ output.

The difference with this one is I have HTTP input instead of MQ Input and on the MQ output node I had to set Pass All for context as it was giving me context error. But I think context setting should not interfere with Correlid when message id can be set. Is it a bug?

Regards

Kiran

I would have the MQOutput node on default => minimum after an HTTP input. It is not best practice to generate your own msgId/ CorrelId. Let the system do it and plug it into the MQ Get node. This is really an anonymous identifier pattern. You don't care what the ID is as long as it is unique and you know what it is. The LocalEnviornment will tell you what the values generated by the MQOutput node were.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
francoisvdm
PostPosted: Fri Dec 12, 2008 1:38 am    Post subject: Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

This sounds VERY similar to one of my "pet" topics. When a flow is started with HTTPInput node then a few of the settings into MQMD DOES NOT WORK, for instance the one tha bugs me is "expiry". You can try as you like to set expiry ANYWHERE in the flow, it just does not go with the newly created message. Now, it seems like you also can't set the correlID. I do believe this to be a bug....anybody wants me to open a PMR for it?

Regards
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Fri Dec 12, 2008 5:07 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Once you create a proper Root.MQMD - and there are several ways to do this, then all of the fields should be taken by the MQOutput node.

Depending on which particular version you are creating a proper Root.MQMD, then some of the fields may be overridden by Root.Properties.

Depending on which particular version of WMB you are using, it is easier or harder to create Root.MQMD properly. A very easy way is to use an MQHeader node in version 6.1. This doesn't help if you are using version 5.
Back to top
View user's profile Send private message
wbi_telecom
PostPosted: Fri Dec 12, 2008 7:32 am    Post subject: Reply with quote

Disciple

Joined: 15 Feb 2006
Posts: 188
Location: Harrisburg, PA

I have a flow starting with httpInput and the catch of httpInput is connected to an error handler sublow. I am creating a MQ message in case of exceptions in the flow and setting an expiry of 10 days before writing that onto an error queue. The creation of new MQMD and Expiry works fine for me in my subflow.

Cheers,
Back to top
View user's profile Send private message
francoisvdm
PostPosted: Sun Dec 14, 2008 10:02 pm    Post subject: Reply with quote

Partisan

Joined: 09 Aug 2001
Posts: 332

wbi_telecom...what version of MB are you using? Thanks
_________________
If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.

Francois van der Merwe
Back to top
View user's profile Send private message Send e-mail
wbi_telecom
PostPosted: Mon Dec 15, 2008 5:38 am    Post subject: Reply with quote

Disciple

Joined: 15 Feb 2006
Posts: 188
Location: Harrisburg, PA

its 6.0.2..same as what kirank is using

Cheers,
Back to top
View user's profile Send private message
girish_tharwani
PostPosted: Wed Jan 21, 2009 12:47 am    Post subject: Reply with quote

Voyager

Joined: 01 Aug 2001
Posts: 88
Location: Pune, India

I do not have much experience of using MQGET node, so I have a question...
In the flow described by Kiran, what happens if there are 3-4 request in quick succession. Will these be processed one after another and sent to out queue via MQOUTPUT node while MQGET node may still be waiting for first reply. Or will the flow wait for first reply before processing the second request? If it will wait for first reply, how long?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jan 21, 2009 1:53 am    Post subject: Reply with quote

Grand High Poobah

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

The MQGET node acts like any get call. The flow will wait for a message to arrive matching it's criteria (no criteria, msg id or correl id) for as long as the wait period is set for. Once a message is received the flow restarts; likewise when the wait period expires but in this instance via the No Message terminal.

For full details of how each situation is configured and handled, check the infocenter
_________________
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 » WebSphere Message Broker (ACE) Support » MQGET node
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.