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 » Resequence node error handling

Post new topic  Reply to topic
 Resequence node error handling « View previous topic :: View next topic » 
Author Message
paintpot
PostPosted: Tue Oct 04, 2011 2:51 am    Post subject: Resequence node error handling Reply with quote

Centurion

Joined: 19 Sep 2005
Posts: 112
Location: UK

Hi all,
WMB 7.0.0.3 toolkit and broker bang up to date. Windows 32 bit for this test env.

I have this flow:

MQInput -> Sequence -> Resequence -> Compute -> MQOutput

Any errors in the Compute node roll back to the Resequence node, which then seems to resend the message again - i.e. it loops.
If I connect the Failure terminal to an error handler sub flow, it is not used.
If I connect the Catch terminal to an error handler sub flow (home grown), then I can consume the message and stop the loop - but no rollback is issued.

I could write a small amount of state into my flow, and cache the message id - and remove any retry messages (e.g. by passing them into an error handler subflow).

Is the Resequence node acting as it should? Anything I have missed? is the strategy above a good one?

Thanks in advance
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Oct 04, 2011 4:36 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Hang some error logic off the Compute node, then you won't get any push back up the chain.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Tue Oct 04, 2011 4:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I haven't looked, but I suspect you'll find that the resequence node acts in the same manner as the Collector node - that it creates a new transaction and new message flow on the out side than from the in side.

If that's true, then, yes, it's acting as designed.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Tue Oct 04, 2011 4:56 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

mqjeff wrote:
I haven't looked, but I suspect you'll find that the resequence node acts in the same manner as the Collector node - that it creates a new transaction and new message flow on the out side than from the in side.

If that's true, then, yes, it's acting as designed.


Therefore it might be good practice to put a TryCatch Node on the output from the resequence node as it is for the collector node...
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
paintpot
PostPosted: Tue Oct 04, 2011 5:07 am    Post subject: Reply with quote

Centurion

Joined: 19 Sep 2005
Posts: 112
Location: UK

thanks guys - my rescuers!! I was worried I was having a tumbleweed moment there.

My issue is that I want to rollback any work after the Resequence node, on error. I don't seem to be able to do this (MQ messages stay 'put') in my test code.

I think I have to:
- take a record of the message id in shared cache
- if the message fails, let it roll all the way back (ought to rollback the transaction)
- on second try, perform error handling (e.g. logging etc)
- kill the message as part of the second try
and
- clear up the cache periodically
Back to top
View user's profile Send private message
paintpot
PostPosted: Wed Oct 05, 2011 12:19 am    Post subject: Reply with quote

Centurion

Joined: 19 Sep 2005
Posts: 112
Location: UK

ok - I have added a Compute node that caches the previous message id, and if there is a match with the current message, it activates error handling and kills the message.

This works - obviously different users might want different approaches, like adding a backout count to the cache to allow more attempts before doing this.

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 » Resequence node error handling
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.