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 » How to pause in a node?

Post new topic  Reply to topic Goto page 1, 2  Next
 How to pause in a node? « View previous topic :: View next topic » 
Author Message
pcelari
PostPosted: Mon Aug 07, 2006 4:19 pm    Post subject: How to pause in a node? Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

Another newbie question.

In my current applications, I use a field in the queue to set a delay, in seconds, after retrieving a msg from a queue, but before start processing it.

How can I do the same in a msgflow?

it must be simple to do.

thanks a lot for any input.
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Aug 07, 2006 4:40 pm    Post subject: Reply with quote

Jedi Knight

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

With V6 of broker, you can use the new Timer nodes ...

http://www-128.ibm.com/developerworks/websphere/library/techarticles/0603_schutz/0603_schutz.html
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
pcelari
PostPosted: Tue Aug 08, 2006 4:51 am    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

thanks for the link, Wayne.

I thought using timer nodes for such trivial function would be too much of an overkill, there must be simpler way of doing this.

Now it seems to make sense to use it.

-Paul
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Aug 08, 2006 5:28 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It's not a trivial function.

It's also a very strange requirement, to have to wait before processing an MQ message. Why not wait before sending it in the first place?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jbanoop
PostPosted: Tue Aug 08, 2006 7:20 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

you could write somthing on the lines of a delay loop or somthing (reminds me of micro processors lab) or you could try having a java compute node (in v 6 ) that would maybe call Thread.Sleep() or somthing on that lines ..
I would be curious to know the business compulsions for such a requirement ..
Anoop
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Tue Aug 08, 2006 7:30 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

jbanoop wrote:
you could write somthing on the lines of a delay loop or somthing (reminds me of micro processors lab) or you could try having a java compute node (in v 6 ) that would maybe call Thread.Sleep() or somthing on that lines ..
I would be curious to know the business compulsions for such a requirement ..
Anoop


The delay loop idea will cause your execution group to hang.

Thread.Sleep() might not.

The Timer node is the best solution.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Aug 08, 2006 7:30 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

sorry for the duplicate.
_________________
I am *not* the model of the modern major general.


Last edited by jefflowrey on Wed Aug 09, 2006 6:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
iceage
PostPosted: Wed Aug 09, 2006 6:03 pm    Post subject: Reply with quote

Acolyte

Joined: 12 Apr 2006
Posts: 68

You shouldnt try to "delay" / "Sleep" / "Pause" at the Broker , its a messaging hogging engine by design & purpose .. Dont slow it down !!!
Back to top
View user's profile Send private message
pcelari
PostPosted: Mon Aug 14, 2006 4:29 pm    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

sorry replying back late. I was away for a few days.

the reason for my delay is:

A query request msg arrives, I transform it to a format for mainframe CICS to generate a record in UDB. As it may take time, and has relatively low priority, I wait 5 seconds before sending the same request in a different XML format to a webservice to retrieve the generated record.

Currently, I use a simple C program to do this, pretty straightforward.

But using WBIMB, I expect to find an even easier way to pause.

thanks for all the inputs. You're right, the trivial in one place may not be trivial in another environment.
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 14, 2006 5:43 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Have CICS return you a reply that says it processed or not.

If you don't get it in five seconds, send the request the other way.

You can use Aggregation for only one request.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
pcelari
PostPosted: Tue Aug 15, 2006 4:19 am    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

No, the CICS only generate the record. it doesn't reply.

That's why the second route is needed to retrieve the result, upon receiving the XML query msg, the webservice queries the UDB and returns the result as an XML msg.
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
pcelari
PostPosted: Tue Aug 15, 2006 4:27 am    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

BTW, this mechanism works fine as it's already in production for quite some time. The delay is run-time configurable as it is set in EnvData field in the queue, 5 seconds is currently being used.
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Aug 15, 2006 4:29 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Ah, I thought the second route was a redundant path to send the request, not the path to receive the reply.

You mean EnvData on the process definition?

You won't be able to get that without a PCF Inquire Queue command from broker.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
pcelari
PostPosted: Tue Aug 15, 2006 4:38 am    Post subject: Reply with quote

Chevalier

Joined: 31 Mar 2006
Posts: 411
Location: New York

Oops, you're right. EnvData in the process definition for the triggering.

the triggered C program sends the msg to CICS, wait EnvData seconds, and sends the otherwise transformed XML msg to queue destined to a webservice, and get the resultset back.

I wonder if there is a function within ESQL that can do the delay. It can't be that difficult.
_________________
pcelari
-----------------------------------------
- a master of always being a newbie
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 15, 2006 4:46 am    Post subject: Reply with quote

Grand High Poobah

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

pcelari wrote:
It can't be that difficult.


Oh yes it can.....

Is it possible to put a trigger on the UDB so that when the CICS writes the result row, the result is sent to a new flow for processing?

Failing that, I think you're best off with a Timer node as previously suggested.
_________________
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 Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to pause in a 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.