Author |
Message
|
LearningMB_PB |
Posted: Wed Jun 20, 2012 4:27 pm Post subject: Add error details to MQMD Header |
|
|
Newbie
Joined: 20 Jun 2012 Posts: 2
|
Hi All,
Our team has built an error handling framework which parses the error details from the exceptionList and populates the values into individual attributes like ExceptionType, ErrorCode, CauseOfError etc. As of now, the entire details are being sent in the body of the queue. Now, i have a requirement to add just the error details to the MQMD header and the actual request message to the body of the queue. Could anyone suggest how this can be accomplished?
Thanks in Advance!! |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jun 20, 2012 5:12 pm Post subject: Re: Add error details to MQMD Header |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
LearningMB_PB wrote: |
Could anyone suggest how this can be accomplished? |
It can't. The MQMD has no provision for the details you're trying to add, and none of the "user" fields in the MQMD are suitable for what you're describing.
You should leave the MQMD alone and add the details as properties. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kash3338 |
Posted: Wed Jun 20, 2012 5:31 pm Post subject: Re: Add error details to MQMD Header |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
LearningMB_PB wrote: |
Now, i have a requirement to add just the error details to the MQMD header and the actual request message to the body of the queue. Could anyone suggest how this can be accomplished?
|
MQMD is not ment for this purpose. You have MQRFH2 headers for this purpose. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jun 20, 2012 6:05 pm Post subject: Re: Add error details to MQMD Header |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kash3338 wrote: |
You have MQRFH2 headers for this purpose. |
Not since WMQv7, when the RFH2 went into retirement. Hence you'll notice I mentioned properties. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 20, 2012 7:30 pm Post subject: Re: Add error details to MQMD Header |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Vitor wrote: |
kash3338 wrote: |
You have MQRFH2 headers for this purpose. |
Not since WMQv7, when the RFH2 went into retirement. Hence you'll notice I mentioned properties. |
Not quite so. RFH2 is still alive in a good many places that haven't quite made the switch to properties (in handle) yet...
Also please note that if you had properties that weren't in the "user" or standard JMS folders, you need to set the property control on queue and channel to ALL  _________________ MQ & Broker admin |
|
Back to top |
|
 |
LearningMB_PB |
Posted: Wed Jun 20, 2012 10:58 pm Post subject: Re: Add error details to MQMD Header |
|
|
Newbie
Joined: 20 Jun 2012 Posts: 2
|
Thanks Vitor, Kash and fjb_saper for your replies.
My requirement to add the error details to the header and the actual request to the body of the queue so that whenever the application is scheduled to retry, it can just take the message from the body of the queue and retry it. If we add the error details in the Properties or the MQRFH2 headers, can the support person be able to see it somewhere (for example in RFHUtil)?
If yes, can you guys point me to a document/forum which gives me details on how to add the details and how to view them? Thanks in Advance!! |
|
Back to top |
|
 |
zpat |
Posted: Wed Jun 20, 2012 11:53 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
There are some fields in MQMD that you could use like Accounting Info. |
|
Back to top |
|
 |
kash3338 |
Posted: Thu Jun 21, 2012 1:32 am Post subject: Re: Add error details to MQMD Header |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
LearningMB_PB wrote: |
My requirement to add the error details to the header and the actual request to the body of the queue so that whenever the application is scheduled to retry, it can just take the message from the body of the queue and retry it. |
Again, this is not the way to design a retry mechanism. In this case only the payload is stored for replay and all the headers with the original payload is lost when you retry.
LearningMB_PB wrote: |
If we add the error details in the Properties or the MQRFH2 headers, can the support person be able to see it somewhere (for example in RFHUtil)? |
For a support person to debug/know the error, there should be a separate error handling mechanism designed. This is not the way to implement error handling. |
|
Back to top |
|
 |
kash3338 |
Posted: Thu Jun 21, 2012 1:42 am Post subject: |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
|
Back to top |
|
 |
zpat |
Posted: Thu Jun 21, 2012 2:08 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
I am not denying that. I am saying that there is a field in MQMD. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 21, 2012 12:14 pm Post subject: Re: Add error details to MQMD Header |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
Vitor wrote: |
kash3338 wrote: |
You have MQRFH2 headers for this purpose. |
Not since WMQv7, when the RFH2 went into retirement. Hence you'll notice I mentioned properties. |
Not quite so. RFH2 is still alive in a good many places that haven't quite made the switch to properties (in handle) yet... |
Yes, it's in retirement. Still in the workplace, wearing a blue smock & saying "Welcome to WMQ" but it's not something which should be used for the development of a new solution. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 21, 2012 12:20 pm Post subject: Re: Add error details to MQMD Header |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
LearningMB_PB wrote: |
My requirement to add the error details to the header and the actual request to the body of the queue so that whenever the application is scheduled to retry, it can just take the message from the body of the queue and retry it. If we add the error details in the Properties or the MQRFH2 headers, can the support person be able to see it somewhere (for example in RFHUtil)? |
Did you ever pause to wonder why RFHUtil is called that? If perhaps it had something to do with the MQRFH2 structure?
As to viewing the message properties, I wonder if anyone at IBM ever considered the possibility that someone might want to look at them & built that capability....?
LearningMB_PB wrote: |
If yes, can you guys point me to a document/forum which gives me details on how to add the details and how to view them? |
Yes, this forum. The WMB InfoCenter has full details on how it handles headers (note that, confusingly, WMB still exposes message properties as an RFH2 internally) including how to add & remove them. Because message properties are message artifcact, the WMQ InfoCenter is the place to look for detailed information (though you will find them referenced in the WMB material). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|