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 » Accessing a remote database from message flow

Post new topic  Reply to topic
 Accessing a remote database from message flow « View previous topic :: View next topic » 
Author Message
zpat
PostPosted: Mon Feb 16, 2009 2:42 am    Post subject: Accessing a remote database from message flow Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

This must be a fairly common requirement but I am interested in how it's generally solved. AIX, WMQ v6, WMB v6.0, Database on i-Series.

We want to have a message queue which contains messages with information to be inserted into a database by a WMB message flow using a compute node (EQSL).

The database is on a different platform to the message broker.

What happens if the database is not available when the message flow tries to access it? I assume an exception is thrown and the message will propagate to the failure terminal of the MQINPUT node?

If this is not connected - it will presumably roll-back and get re-processed and then moved to the backout-requeue queue when the backout threshold is reached?

Is this the best way to handle this? What do other people do in this situation?

What I would want to happen is the messages remain on the original queue until successfully processed and the database update retried at a reasonable interval. How could this be coded?
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Feb 16, 2009 2:55 am    Post subject: Re: Accessing a remote database from message flow Reply with quote

Grand High Poobah

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

zpat wrote:
I assume an exception is thrown and the message will propagate to the failure terminal of the MQINPUT node?


Or the first connected failure terminal of a downstream node (typically a TryCatch node)

zpat wrote:
If this is not connected - it will presumably roll-back and get re-processed and then moved to the backout-requeue queue when the backout threshold is reached?


Yes. Hence the use of a try block to divert the error.

zpat wrote:
Is this the best way to handle this? What do other people do in this situation?


We use a Filter node to weed out transient errors (like database) from permanent errors and route them accordingly.

zpat wrote:
What I would want to happen is the messages remain on the original queue until successfully processed and the database update retried at a reasonable interval. How could this be coded?


Why the original queue? This interferes with poison message handling. We use a cron job to move the contents of the "transient" errors queue back onto the original queue at intervals, subject to some checking about how many times they've gone round the loop. This is achieved by some hand-rolled code and the <usr> folder.

You could probably manage something similar with Timer nodes now, but this mechanism pre-dates them.

Other solutions are undoubtably possible and may be superior.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mgk
PostPosted: Mon Feb 16, 2009 3:15 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Quote:
Or the first connected failure terminal of a downstream node (typically a TryCatch node)


I think you mean "Or the first connected catch terminal..."

Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
zpat
PostPosted: Mon Feb 16, 2009 3:19 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

OK so using an error (re-queue) queue and timer node to re-submit them to the original queue at intervals is definitely one option.

Can anyone give me some examples of likely transient and permanent errors to handle?


Last edited by zpat on Mon Feb 16, 2009 3:25 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Feb 16, 2009 3:21 am    Post subject: Reply with quote

Grand High Poobah

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

mgk wrote:
Quote:
Or the first connected failure terminal of a downstream node (typically a TryCatch node)


I think you mean "Or the first connected catch terminal..."


D'oh!

It's the smell of Windolene in here; fumes right up my nose.
_________________
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 » Accessing a remote database from message flow
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.