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 » TimeOuts & using CorrelationID

Post new topic  Reply to topic
 TimeOuts & using CorrelationID « View previous topic :: View next topic » 
Author Message
Mirage
PostPosted: Tue Nov 30, 2004 7:41 am    Post subject: TimeOuts & using CorrelationID Reply with quote

Apprentice

Joined: 30 Nov 2004
Posts: 44
Location: IL

Hello,

I'm working on a message flow which uses a WBI JText Adapter to FTP the files to mainframe. The Requirement for the flow is to handle exceptions that occur in the process, say for example if there was an error in FTP'ing the file to Mainframe the error generated by JText Adapter should be caught in the flow and logged to DB.

If we give the ReplyToQueue name and queue manager name, JText Adapter will write the response(whether its a success or failure) setting the correlation id to message id of request.

Here are some of the details of the design we thought about.
1. In message flow, write the request message to JText adapter's request queue.
2. Store the MessageID.
[[Outside the Flow JText Adapter picks the message, processe's it and puts a success/failure message on the response queue.]]
3. Set a Timeout & within this timeout, use the MessageID to read a message out of response queue whose correlation id is matching. [[MQGET with correlation ID & Timeout]]
4. If there was a message then get the message, parse its contents to find success or failure. If there was no message there should have been a Time out exception thrown in the flow. Log the response.

Question: Is there a predefined node/ custom node available to perform this(MQGet-correlId&Timeout) task ?. If not can you suggest on how to achieve it.
Should I use Aggregate Nodes to achieve the Timeout functionality or Write a custom node with MQ Java API to use the MQ's inbuilt Timeout functionality.

Note: This functionality is actually provided by WBI MQ Adapter, so I'm wondering why it isnt provided in MessageBroker.

Thanks for the help and Please let me know your questions.

Cheers,
Raghu.
Back to top
View user's profile Send private message
tej
PostPosted: Thu Dec 02, 2004 8:28 am    Post subject: Reply with quote

Novice

Joined: 18 Nov 2002
Posts: 20

The simplest way is to include the request and response in the message and keep the request portion unlatered in the reply. and compre the time stamp from that header. This should agreed by both ends
Tej
Back to top
View user's profile Send private message Send e-mail
JT
PostPosted: Thu Dec 02, 2004 11:17 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Quote:
JText Adapter will write the response(whether its a success or failure) setting the correlation id to message
id of request.

Is this true for all conditions? Are there situations where the adapter doesn't reply?
If the adapter always replies, can you wait to log your time-out event until you eventually receive the reply?

Quote:
Is there a predefined node/ custom node available to perform this(MQGet-correlId&Timeout) task ?.

Not one that's available "off the shelf". The MQGet plug-in (IA07 supportpac) does not have wait logic built in.

Quote:
If not can you suggest on how to achieve it.

I know there's been discussion/dis-agreement in the past amongst this site's members regarding the implementation of latency into a message flow, but like yourself we had a scenario where we had a need to create a MQGet plug-in with a configurable wait interval. Although it's been working without incident, we're prudent with it's use.

Quote:
Should I use Aggregate Nodes to achieve the Timeout functionality or Write a custom node with
MQ Java API to use the MQ's inbuilt Timeout functionality.

I would suggest against using the Aggregate nodes for this purpose (although you certainly can accomplish what you want with them). As I'm sure you're aware, the objective of the Aggregate nodes is to merge the replies from multiple requests into a single message. Using the Aggregates's time-out feature, should a reply not return in time, is a ancillary benefit. I would go with developing a custom node.
Back to top
View user's profile Send private message
Mirage
PostPosted: Fri Dec 03, 2004 10:33 am    Post subject: Reply with quote

Apprentice

Joined: 30 Nov 2004
Posts: 44
Location: IL

Hi JT,

Thanks for your input on this. We've decided to go with a Custom node just like you said.
This is what we are planning to do.

By using the MQ's Java API we are building(coding is almost done) a custom node, which will take the MessageID, MQ response queue connection details and Timeout interval as input parameters. It'll monitor the queue for a message whose correlation id is matching the message id, if there is a message(success/failure) it'll be picked up and an XML message is build to pass to the next node. If there was no message, we catch the timeout exception and build an error XML message.

Do you think of anything that we are missing here ? any suggestions ?
I'm not sure about how to set the input parameters to the CustomNode dynamically in the messageflow. Can you give some info on this. ?

Thanks - Raghu.

Quote:

Is this true for all conditions? Are there situations where the adapter doesn't reply?
If the adapter always replies, can you wait to log your time-out event until you eventually receive the reply?


Yes, as long as the Adapter is up it'll write the response to the response queue.
Back to top
View user's profile Send private message
kalyanMD
PostPosted: Fri Jun 01, 2007 2:03 am    Post subject: Re: TimeOuts & using CorrelationID Reply with quote

Novice

Joined: 03 Feb 2005
Posts: 14
Location: London UK

Mirage wrote:
Hello,

I'm working on a message flow which uses a WBI JText Adapter to FTP the files to mainframe. The Requirement for the flow is to handle exceptions that occur in the process, say for example if there was an error in FTP'ing the file to Mainframe the error generated by JText Adapter should be caught in the flow and logged to DB.

If we give the ReplyToQueue name and queue manager name, JText Adapter will write the response(whether its a success or failure) setting the correlation id to message id of request.

Here are some of the details of the design we thought about.
1. In message flow, write the request message to JText adapter's request queue.
2. Store the MessageID.
[[Outside the Flow JText Adapter picks the message, processe's it and puts a success/failure message on the response queue.]]
3. Set a Timeout & within this timeout, use the MessageID to read a message out of response queue whose correlation id is matching. [[MQGET with correlation ID & Timeout]]
4. If there was a message then get the message, parse its contents to find success or failure. If there was no message there should have been a Time out exception thrown in the flow. Log the response.

Question: Is there a predefined node/ custom node available to perform this(MQGet-correlId&Timeout) task ?. If not can you suggest on how to achieve it.
Should I use Aggregate Nodes to achieve the Timeout functionality or Write a custom node with MQ Java API to use the MQ's inbuilt Timeout functionality.

Note: This functionality is actually provided by WBI MQ Adapter, so I'm wondering why it isnt provided in MessageBroker.

Thanks for the help and Please let me know your questions.

Cheers,
Raghu.


Hi Raghu,

Can I please get that bit of esql code that you are using for code page conversion for mainframe and the configuration file and business objects file that u r using to do an ftp thru JText adapter. As we are trying to convert code page on our message broker and Jtext is sending FTP files to AS400 but, at AS400 end files are not getting processed.

Regards,
Kalyan
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » TimeOuts & using CorrelationID
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.