Author |
Message
|
vijayakumar |
Posted: Sat Apr 30, 2011 8:49 am Post subject: Notify the messages going to backout queue |
|
|
Centurion
Joined: 01 Aug 2010 Posts: 101
|
In the message flow, if the messages are failed(not handling the exception) we are retrying the message based on the bothreshold count and the messages are going to Backout Queue .
when retrying ,the messages will go to the backout queue only if the exception r failure is handled.
Is there anyway to log the exception to a file before the message going to the backout queue. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sat Apr 30, 2011 9:02 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
They already are...
The System error log.
On our Unix system we have user events diverted to /logs/mqsi/wmbevent.log
In this file we see MQ Events with an MQRC of 2008 (Backedout)
Naturally you can have some custom code in your exception handling to output to a file. There are many ways to do this including but not limited to
- FileOutputNode
- Trace Node (not recommented but commonly used)
- Log4j _________________ 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 |
|
 |
vijayakumar |
Posted: Sat Apr 30, 2011 9:36 am Post subject: |
|
|
Centurion
Joined: 01 Aug 2010 Posts: 101
|
But if we handle the exception to a file or anyother node, the message will not go to the backout queue . |
|
Back to top |
|
 |
smdavies99 |
Posted: Sat Apr 30, 2011 10:19 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Try re-throwing the exception _________________ 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 |
|
 |
vijayakumar |
Posted: Sun May 01, 2011 10:57 am Post subject: |
|
|
Centurion
Joined: 01 Aug 2010 Posts: 101
|
Retried based on the BOthreshold, but how the messages can be logged to a file since we need the exceptional messages to be in Backout Queue. |
|
Back to top |
|
 |
rekarm01 |
Posted: Sun May 01, 2011 3:59 pm Post subject: Re: Notify the messages going to backout queue |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
smdavies99 wrote: |
Try re-throwing the exception |
RESIGNAL? |
|
Back to top |
|
 |
mqjeff |
Posted: Sun May 01, 2011 4:53 pm Post subject: Re: Notify the messages going to backout queue |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
rekarm01 wrote: |
smdavies99 wrote: |
Try re-throwing the exception |
RESIGNAL? |
Quote: |
You can use RESIGNAL only in error handlers. |
|
|
Back to top |
|
 |
rekarm01 |
Posted: Sun May 01, 2011 5:20 pm Post subject: Re: Notify the messages going to backout queue |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
mqjeff wrote: |
Quote: |
You can use RESIGNAL only in error handlers. |
|
Does ESQL offer any other way to rethrow an exception? |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun May 01, 2011 7:33 pm Post subject: Re: Notify the messages going to backout queue |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
rekarm01 wrote: |
mqjeff wrote: |
Quote: |
You can use RESIGNAL only in error handlers. |
|
Does ESQL offer any other way to rethrow an exception? |
Send to an output terminal linked to a throw node somewhere down the road?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
rekarm01 |
Posted: Mon May 02, 2011 4:42 am Post subject: Re: Notify the messages going to backout queue |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
fjb_saper wrote: |
Send to an output terminal linked to a throw node somewhere down the road? |
A Throw node throws a new exception; it does not rethrow an existing one.
It discards any existing exception(s), and in the process, tends to clutter up the syslog / event log with BIP2232E ("Error detected whilst handling a previous error") and related messages. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon May 02, 2011 5:02 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Those are excellent facts.
I'm reasonably sure smdavies99 meant that vijaykumar should use a throw node, however. |
|
Back to top |
|
 |
rekarm01 |
Posted: Mon May 02, 2011 1:50 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
mqjeff wrote: |
I'm reasonably sure smdavies99 meant that vijaykumar should use a throw node, however. |
Fair enough. A Throw node (or THROW statement) in the catch-branch adequately meets the given requirements. |
|
Back to top |
|
 |
vijayakumar |
Posted: Tue May 03, 2011 11:44 am Post subject: |
|
|
Centurion
Joined: 01 Aug 2010 Posts: 101
|
Thanks to all for your replies. |
|
Back to top |
|
 |
|