|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Handling Errors with MB |
« View previous topic :: View next topic » |
Author |
Message
|
fabyos |
Posted: Tue Jun 16, 2009 1:35 pm Post subject: Handling Errors with MB |
|
|
Apprentice
Joined: 15 May 2009 Posts: 37
|
Hi,
I'm thinking about in how to deal with different types of errors/exception.
I've a compute node and want to perform a different action based on error/exception. I have messages that comes from MQ Input node, and if some error occur the input message is 'rollback' and go to the appropriate message queue.
For example, a database error connection the input message should go to a FAIL queue. But a parsing erro should go to a ERROR queue.
How can I do this? The catch nodes arent based on type of exception (parser, recoverable, database and etc). Am I missing something?
I'm currently planning on use the Out'n' output from compute node to route the differente kinds of error, and exceptions catch only FAILs. However, parsing errors goes to FAIL queue, which I wont. |
|
Back to top |
|
 |
harish_td |
Posted: Tue Jun 16, 2009 6:12 pm Post subject: |
|
|
Master
Joined: 13 Feb 2006 Posts: 236
|
Error handling is a unique requirement which is business and site specific.
There is no "one size fits all" error handling.
For starters look at the Help --> Samples Gallery --> Application Samples --> Message Broker --> Error Handler |
|
Back to top |
|
 |
MQEnthu |
Posted: Tue Jun 16, 2009 8:29 pm Post subject: |
|
|
 Partisan
Joined: 06 Oct 2008 Posts: 329 Location: India
|
fabyos wrote: |
For example, a database error connection the input message should go to a FAIL queue. But a parsing erro should go to a ERROR queue. |
Why do you need this?? There can be n types of exceptions/errors..will you have n number of queues??
If your intention is to record the exception/error somewhere, there are many ways to do that. Go through the Info center/sample gallery. _________________ -----------------------------------------------
It is good to remember the past,
but don't let past capture your future |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jun 16, 2009 11:41 pm Post subject: Re: Handling Errors with MB |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fabyos wrote: |
How can I do this? The catch nodes arent based on type of exception (parser, recoverable, database and etc). Am I missing something? |
Wire the catch terminal to a compute node, which parses the Exception list tree and routes the message as you require. Do not forget to include handling for errors you do not specifically handle. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Jun 17, 2009 1:04 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Remember that for Database errors, you can disable the automatic exception throwing is a Compute (& other) node and then handle the detection and subsequent throwing of such errors in ESQL. For example, you may do an insert into a table and you don;t care if there is already a primary key with the same values as the one you are trying to insert. In this case you can manually detect the error code and only throw an exception if it is some other error.
Also, I like to handle all DB errors this way. I can add the actual command that I was trying to perform to the error data (held in Environment...) so that any reporting has more than the bare information from the exceptionList. _________________ 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 |
|
 |
fabyos |
Posted: Wed Jun 17, 2009 5:08 am Post subject: |
|
|
Apprentice
Joined: 15 May 2009 Posts: 37
|
Unfortunatelly I cant catch the exception throwed by node because I have a compute node that does to much thing (if i could I`d separate it).
THe compute node verifies the input message, then it calls a procedure based on the input information. The procedure could fail due to a connection problem, for example, or the data passed is invalid or has a problem, so a diferente type of handle must be done. Secondly, I receive a XML output from procedure call, and it must be parsed in order to remove some nodes.
So the XML could be wrong, so I have to take a different action.
Actually, there is only two queues, and I dont wanna have one queue for each type of exception. I just wanna filter some when possible, and let the other be caught as normally.
I didnt tried the options yet. This post is just to clear my situation. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|