Author |
Message
|
MrSmith |
Posted: Mon Oct 08, 2012 1:05 am Post subject: Timeout Control and Notification Query |
|
|
 Master
Joined: 20 Mar 2008 Posts: 215
|
I have posted something similar on these nodes before, without resolution but wish to understand better from experience thatn what is written in the manuals
Version 6.1
Timeout Notification = controlled
Identifier = "MYIDENT"
My understanding is - if I create a TimeoutControl message as below:
Code: |
DECLARE expiryTime TIME;
SET expiryTime = CURRENT_TIME + CAST(timeoutSeconds AS INTERVAL SECOND); -- this is et to 7200 (i.e. 2 hours)
-- Set the clock ticking...
SET OutputRoot.XMLNSC.TimeoutRequest.Action = 'SET';
SET OutputRoot.XMLNSC.TimeoutRequest.Identifier = 'MYIDENT';
SET OutputRoot.XMLNSC.TimeoutRequest.StartTime = expiryTime;
--SET OutputRoot.XMLNSC.TimeoutRequest.Interval = timeoutSeconds;
SET OutputRoot.XMLNSC.TimeoutRequest.Count = 1;
SET OutputRoot.XMLNSC.TimeoutRequest.IgnoreMissed = TRUE;
SET OutputRoot.XMLNSC.TimeoutRequest.AllowOverwrite = TRUE;
|
This will "trigger" a notification message to the corresponding TimeoutNotification of the same identifier when the timeout has exceeded (this works fine no problem) the bit that does not seem to work as I had envisioned is the TimeoutRequest.AllowOverwrite = TRUE;
My interpretation of this is that if I sent another TimeoutControl message with the SAME identifier that the second one would overwrite the first which is what I want to achieve changing the timeout in seconds from what was remaining of the 7200 with one of 90 seconds (thus giving the flow time to produce what it should) or genertaing a timeout exception to say the process did not complete in that 90 seconds.
Does this all make sense?
Have I misinterpreted the AllowOverwrite (the manual would imply it is as I said) but it doesn't do that, I get an exception saying the ident was already used or 2 messages on the SYSTEM.BROKER.TIMEOUT.QUEUE, one of which is then removed with a CANCEL later leaving one orphaned
Thanks _________________ -------- *
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.” |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Oct 08, 2012 5:01 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
Esa |
Posted: Mon Oct 08, 2012 5:30 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
lancelotlinc wrote: |
You might think more about cron for scheduling rather than trying to schedule events in WMB. |
I bet you did not read the post properly. Are you seriously suggesting writing dynamic crontab entries from a message flow in order to delay processing of individual messages?
I guess a timeout message cannot be overridden after "the clock has been set ticking". The problem is that this seems to apply to all timeout messages... |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Oct 08, 2012 5:39 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Esa wrote: |
lancelotlinc wrote: |
You might think more about cron for scheduling rather than trying to schedule events in WMB. |
I bet you did not read the post properly. Are you seriously suggesting writing dynamic crontab entries from a message flow in order to delay processing of individual messages?
I guess a timeout message cannot be overridden after "the clock has been set ticking". The problem is that this seems to apply to all timeout messages... |
I meant what I said. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
MrSmith |
Posted: Mon Oct 08, 2012 9:46 am Post subject: |
|
|
 Master
Joined: 20 Mar 2008 Posts: 215
|
Esa wrote: |
I guess a timeout message cannot be overridden after "the clock has been set ticking". The problem is that this seems to apply to all timeout messages... |
Then why have an Overwrite option on the settings and create documentation that says just that, the only conflict I can see was that the option then says its not configurable even though you can have TRUE nand FALSE option set.....just contradicts itself a bit
One thing I havent tried is whether TRUE and FALSE are Text or Boolean?
Is there not somebody from the IBM Labs that can answer this for me please?
Lancelotlinc - Cron is no use in this scenario - i have four incoming messages the first triggers the start of a time countdown, the fourth if not received in this time then creates an exception event - con will not do this for me without some significant additional programming to set the cron job then find out if it was triggered etc etc just adds more failure points, the sample given in the toolkit and the docs apparently should do exactly what I want here but doesnt - I just want to know that I am right and its a PMR or wrong in my perception of this. Thanks _________________ -------- *
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.”
Last edited by MrSmith on Mon Oct 08, 2012 11:22 am; edited 1 time in total |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Oct 08, 2012 10:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
So the AllowOverwrite must be TRUE on the first request in order for the second request no to thorwn an exception.
But you haven't said that what happens is that you get an exception.
You've just basically said "it doesn't work". If AllowOverwrite is not working correctly, then you'd see an exception thrown when you tried to submit the request.
You might want to review http://www.ibm.com/developerworks/websphere/library/techarticles/0603_schutz/0603_schutz.html |
|
Back to top |
|
 |
rekarm01 |
Posted: Mon Oct 08, 2012 4:12 pm Post subject: Re: Timeout Control and Notification Query |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
MrSmith wrote: |
One thing I havent tried is whether TRUE and FALSE are Text or Boolean? |
Try that. If the XMLNSC parser has to convert from boolean to character, the resulting string is, by default, a lowercase "true" or "false", per the XML 1.0 Schema specification. This may not be suitable for the TimeoutControl message.
MrSmith wrote: |
I get an exception saying the ident was already used or 2 messages on the SYSTEM.BROKER.TIMEOUT.QUEUE, one of which is then removed with a CANCEL later leaving one orphaned |
Please be more specific about which Exception occurred, or which message gets canceled or orphaned. It may also be useful to browse the control message on the TIMEOUT queue, (or else examine it in a usertrace), to see if it has other issues. |
|
Back to top |
|
 |
mgk |
Posted: Mon Oct 08, 2012 6:40 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
I have had a quick look for you and it seems that it first looks for a string 'TRUE' and then if it has a problem it will try a boolean in some circumstances. So, firstly, use:
SET OutputRoot.XMLNSC.TimeoutRequest.AllowOverwrite = 'TRUE';
to make it a string.
Secondly, you mentioned an "exception saying the ident was already used" and assuming this is a BIP4610 then this should only be thrown if it has not picked up the AllowOverwrite flag and the identity was already used.
If it is still not working when using a string, please raise a PMR for clarification, but it looks like what you are trying to do should work...
Kind 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 |
|
 |
fjb_saper |
Posted: Mon Oct 08, 2012 7:43 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mgk wrote: |
I have had a quick look for you and it seems that it first looks for a string 'TRUE' and then if it has a problem it will try a boolean in some circumstances. So, firstly, use:
SET OutputRoot.XMLNSC.TimeoutRequest.AllowOverwrite = 'TRUE';
to make it a string.
Secondly, you mentioned an "exception saying the ident was already used" and assuming this is a BIP4610 then this should only be thrown if it has not picked up the AllowOverwrite flag and the identity was already used.
If it is still not working when using a string, please raise a PMR for clarification, but it looks like what you are trying to do should work...
Kind regards, |
How would 0/1 for false/true work in these circumstances?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mgk |
Posted: Mon Oct 08, 2012 9:46 pm Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
How would 0/1 for false/true work in these circumstances? |
Poorly  _________________ 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 |
|
 |
MrSmith |
Posted: Tue Oct 09, 2012 2:16 am Post subject: |
|
|
 Master
Joined: 20 Mar 2008 Posts: 215
|
mqjeff wrote: |
So the AllowOverwrite must be TRUE on the first request in order for the second request no to thorwn an exception.
But you haven't said that what happens is that you get an exception.
You've just basically said "it doesn't work". If AllowOverwrite is not working correctly, then you'd see an exception thrown when you tried to submit the request.
You might want to review http://www.ibm.com/developerworks/websphere/library/techarticles/0603_schutz/0603_schutz.html |
Thats very true I did just say that - to elaborate it throws and exception from the TimerControl Node with an Exception message of the fact that the SET ID already exists, I can see that this would be correct if the Overwrite were set to False but if you allow Overwrite then to me that message is incorrect??
I have already trawled the internet and read this article jeff there is nothing in there that made me think that it functioned any differently to what the manuals say tbh _________________ -------- *
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.” |
|
Back to top |
|
 |
MrSmith |
Posted: Tue Oct 09, 2012 2:23 am Post subject: |
|
|
 Master
Joined: 20 Mar 2008 Posts: 215
|
mgk wrote: |
I have had a quick look for you and it seems that it first looks for a string 'TRUE' and then if it has a problem it will try a boolean in some circumstances. So, firstly, use:
SET OutputRoot.XMLNSC.TimeoutRequest.AllowOverwrite = 'TRUE';
to make it a string.
Secondly, you mentioned an "exception saying the ident was already used" and assuming this is a BIP4610 then this should only be thrown if it has not picked up the AllowOverwrite flag and the identity was already used.
If it is still not working when using a string, please raise a PMR for clarification, but it looks like what you are trying to do should work...
Kind regards, |
mgk - Thanks for the looking will try that in a mo as it was the only thing I could think of as to why it wouldnt work. The eException is indeed 4610 and had assumed that it was thrown becasue the Overwrite was not "implemented". Thanks for ALL you help people _________________ -------- *
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.” |
|
Back to top |
|
 |
MrSmith |
Posted: Tue Oct 09, 2012 2:42 am Post subject: |
|
|
 Master
Joined: 20 Mar 2008 Posts: 215
|
OK peeps nice one the 'TRUE' does have to be text not as the docs would lead you to believe perhaps as in TRUE (boolean) this as text seemed to work fine BUT also had to be 'TRUE' not 'true'
Thx again _________________ -------- *
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.” |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Oct 09, 2012 2:53 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
MrSmith wrote: |
OK peeps nice one the 'TRUE' does have to be text not as the docs would lead you to believe perhaps as in TRUE (boolean) this as text seemed to work fine BUT also had to be 'TRUE' not 'true'
Thx again |
which means Wayne's examples in his article are incorrect.  |
|
Back to top |
|
 |
rekarm01 |
Posted: Tue Oct 09, 2012 8:56 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
mqjeff wrote: |
which means Wayne's examples in his article are incorrect.  |
Not necessarily. Different parsers may convert boolean to character differently. The given examples use either the XML or MRM parsers, but for WMBv6.0, even the XMLNSC parser generated uppercase 'TRUE' or 'FALSE'.
The purpose of an explicit ESQL CAST is to avoid parser-dependent behavior. |
|
Back to top |
|
 |
|