Author |
Message
|
kishoreraju |
Posted: Mon Feb 27, 2006 12:31 am Post subject: Can we use MQRFH2 headers for retry |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
Hi All,
I have to implement Retry mechanism in my project. For the i have to Maintain the retrycount some where( client don't want to use database for that)
So i am planning to use MQRFH2 Headers to store the retry information (I am using this MQRFH2 Header only in MB Environment and setting it to null when delivering to target application). can we do like this.
presently i am storing the Retrycount in the following area of MQFRH2 Header.
OutputRoot.MQRFH2.usr.RetryCount=Cast(OutputRoot.MQRFH2.usr.RetryCount as Int) +1;
and updating the count accodingly. but the problem is after executing the above the statement Retrycount is not updating.
How can we do this. |
|
Back to top |
|
 |
elvis_gn |
Posted: Mon Feb 27, 2006 1:02 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi kishoreraju,
Could you explain your requirement a little better.
Will you be be picking a message, checking the retry count and then attempting to send itagain...if it is not meant to be sent then you will increase the count and put it where ??
U can use MQRFH but u will have to maintain the other fields too like the format etc....
Isn't there a retry count in the queue itself...before it backs out....but this is a risky approach i feel.
Regards. |
|
Back to top |
|
 |
jfluitsm |
Posted: Mon Feb 27, 2006 1:19 am Post subject: |
|
|
Disciple
Joined: 24 Feb 2002 Posts: 160 Location: The Netherlands
|
The broker provides a retry mechanism using the message backoutcount and the queue backout threshold and backout queue (optional).
There is a paragraph in the documentation about MQInput Error handling. _________________ Jan Fluitsma
IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6 |
|
Back to top |
|
 |
kishoreraju |
Posted: Mon Feb 27, 2006 2:12 am Post subject: |
|
|
Disciple
Joined: 30 Sep 2004 Posts: 156
|
Hi elvis
After updating the retry count(increasing the retry count) i will send it to the main flow will do the actual processing and i have to do it for a specific number of times or until it sucess
We can use the backout count for retry . I my requirement i have to do the retry 5 minutes after the failture occured. At this point how we can use backout count. |
|
Back to top |
|
 |
elvis_gn |
Posted: Mon Feb 27, 2006 2:29 am Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi kishoreraju,
Quote: |
my requirement i have to do the retry 5 minutes after the failture occured. At this point how we can use backout count. |
You can back it out but u cannot specify time to pick it again...the flow will pick it again and again until you dispose of the message.
Atleast in v5, I cannot figure out how u could ask the flow to pick the message immediately if it is coming for the first time or 5 minutes later if it has come before
You could use the put time of the message and set the count as a additional field in the message.....I feel i'm going to far but
Regards. |
|
Back to top |
|
 |
jfluitsm |
Posted: Mon Feb 27, 2006 2:41 am Post subject: |
|
|
Disciple
Joined: 24 Feb 2002 Posts: 160 Location: The Netherlands
|
You can use the backout queue with an own backoutcount in the RFH2 as you suggested. Keep the backoutthreshold at 0.
After the message fails it is send to the backout queue.
If you schedule a process on the backout queue, say every 7.5 or 10 minutes. The process reads the backout queue, add 1 to the backout count and put the message on the input queue again.
You can not use the backoutcount of the message for this as this field is read-only and is set and changed by MQ itself. _________________ Jan Fluitsma
IBM Certified Solution Designer WebSphere MQ V6
IBM Certified Solution Developer WebSphere Message Broker V6 |
|
Back to top |
|
 |
wschutz |
Posted: Mon Feb 27, 2006 3:00 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Any chance you're using Broker V6? I've written a paper on using timeout nodes with V6, and one of the scenarios is using them for message retry, but, of course, it only works on V6. _________________ -wayne |
|
Back to top |
|
 |
|