Author |
Message
|
Bichu |
Posted: Mon Oct 03, 2016 9:21 am Post subject: Invoke webservice once in a day |
|
|
Centurion
Joined: 16 Oct 2011 Posts: 124 Location: London
|
Hi Guys,
I need to request an HTTP webservice once in a day. Is timer a good option or any alternatives. I am working in MQ v7.5 and IIB 9.0.0.0
Your thoughts please.
Thanks in advance. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 03, 2016 9:43 am Post subject: Re: Invoke webservice once in a day |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Bichu wrote: |
I need to request an HTTP webservice once in a day. Is timer a good option or any alternatives. I am working in MQ v7.5 and IIB 9.0.0.0 |
The Timer nodes, as has been stated many times on this forum, which you would have found if you'd tried looking and which you were explicitly told here, are not a good solution for wall clock timed jobs. They are, as the name suggests, just countdown timers not schedulers and become unreliable in these use cases.
One cheap and easy solution is to have a flow with an MQInput, and start that once a day by having cron drop a message on the queue with amqsput.
Another good idea is not to run 9.0.0.0. You're 6 fix packs behind the curve, and you're likely to trip over problems to which there are already solutions. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
adubya |
Posted: Mon Oct 03, 2016 10:42 am Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 03, 2016 11:34 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Observe this:
Quote: |
If the start time is more than approximately five minutes in the past, a warning is issued and the TimeoutControl node rejects the timeout request. |
So if there's been a broker or execution group restart, the timer may not fire. Cron and other schedulers will pick up missed events. Also the TimeoutControl node fires an event when it detects the StartTime has passed. There can be a significant latency before the TimeoutControl fires the event, and more latency before the event is processed. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
adubya |
Posted: Mon Oct 03, 2016 11:38 am Post subject: |
|
|
Partisan
Joined: 25 Aug 2011 Posts: 377 Location: GU12, UK
|
Quote: |
If the start time is more than approximately five minutes in the past, a warning is issued and the TimeoutControl node rejects the timeout request.
|
That refers to the initial setting of the timeout control though, i.e I send a control message with a start time in the past.
The "IgnoreMissed" element controls what happens if the flow wasn't running when the start time was reached.
And how much latency have you experienced between the desired event time and it actually firing ? Seconds/minutes ? _________________ Independent Middleware Consultant
andy@knownentity.com |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 03, 2016 11:55 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
adubya wrote: |
And how much latency have you experienced between the desired event time and it actually firing ? Seconds/minutes ? |
Everything from seconds, through minutes, through not at all.
That's why this site doesn't use them for this. We use them to control service timeouts. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Oct 04, 2016 3:17 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Vitor wrote: |
adubya wrote: |
And how much latency have you experienced between the desired event time and it actually firing ? Seconds/minutes ? |
Everything from seconds, through minutes, through not at all.
That's why this site doesn't use them for this. We use them to control service timeouts. |
My experience is different from my esteemed colleague however I do agree with his observations when you have lots of different timers all going off.
In recent years I have setup just one Timer Flow. This runs every 'n' minutes at 'm' seconds past the minute and then uses a DB table to fire off times messages as needed by each event.
By doing it this way we can easily control the times events outside the message flow.
It is also very reliable. Several sites have been running for years and never missed a beat. _________________ 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 |
|
 |
|