Author |
Message
|
diego_maradona21 |
Posted: Wed Jul 30, 2008 5:58 am Post subject: is it possible to retry after end of whole message flow |
|
|
Novice
Joined: 24 Jul 2008 Posts: 17
|
hi
i have this scenario.
I have a flow that takes some (max 50 rows) information from database table. Than i put it to Environment array, and make single messages from every row. Then every message is propagated to HttpRequest Node. I want to repeat this flow every 60 seconds but it is important that if it will not end in that 60 second i cant start next one. So for example if i will have timeout on HttpRequest node (50 timeouts) i have to wait for last timeout and then set 60 seconds interval.
is it possible? |
|
Back to top |
|
 |
sami.stormrage |
Posted: Wed Jul 30, 2008 7:44 am Post subject: |
|
|
 Disciple
Joined: 25 Jun 2008 Posts: 186 Location: Bangalore/Singapore
|
this post should have been in mqsi support..
And could you be clearer on what the retries and timeouts are.. _________________ *forgetting everything * |
|
Back to top |
|
 |
sridhsri |
Posted: Wed Jul 30, 2008 10:42 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
It appears from what you have said that a single TimeoutNotification Node should suffice. The properties in the TimeoutRequest - Interval (60) and Count (-1) are what you are looking for. |
|
Back to top |
|
 |
AkankshA |
Posted: Wed Jul 30, 2008 8:01 pm Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
Timeout notification node ll send out main msg every 60 seconds
and what i understood from the post of diego_maradona21 is that he want to wait for 60 second after the last message?http resuest is propagated out...
Is my understanding correct, diego_maradona21? _________________ Cheers |
|
Back to top |
|
 |
diego_maradona21 |
Posted: Wed Jul 30, 2008 10:31 pm Post subject: |
|
|
Novice
Joined: 24 Jul 2008 Posts: 17
|
ok so here we go
I have a flow that gets something from db. I have timeout notification node at the beginning an it is set to fire every 60 seconds. Somewhere in my flow i have httprequest node and than two paths - one connected to failure terminal and other to out terminal. I have maximum 50 messages to be sent by http requested EACH flow (cause i take 50 rows from db and convert them to messages). If it's all right and no timeout is thrown - 60 seconds from one flow to another is ok, but if i have timeout (50 messages - 50 timeouts) it will take longer than 60 seconds (to propagate last message to the end of the flow) and timeoutnotification will be fired before flow ends and i will get next 50 messages. So if web service will be down for long time quantity of messages in the flow will grow and grow. And this is what i dont want cause it is essential for me to send messages from db in correct order.
By timeout i mean that web service could be down and every message will have to wait few seconds before connection timeout with web service is thrown. |
|
Back to top |
|
 |
Gaya3 |
Posted: Wed Jul 30, 2008 10:38 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
the webservice works in synchronous mode..
how can you make this to communicate with asynchronous mode?
if your webservice is not available, it will throw an time out exception and a soap fault will get generated. if your error handling is fine, it will roll back the original messages.
you can do some retry code to connect with your webservice for some time, if it succeeds well and good, if not...you can keep it in a hold queue and re-process it later (say 60 seconds) _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
francoisvdm |
Posted: Thu Jul 31, 2008 1:02 am Post subject: |
|
|
Partisan
Joined: 09 Aug 2001 Posts: 332
|
1. Just after the timeout notification check a SHARED variable if it is set to 1, if still 1, then stop flow (iow, another flow is still active). At the end of flow after 50 records handled, set this var to 0, so the next time a notification fire it will start normal flow again.
2. Use a timeoutcontrol node and switch notification off right after the notification fire. Then normal process. After you handled 50 records, just switch timeoutnotification on again. _________________ If you do not know the answer or you get the urge to answer with "RTFM" or "Search better in this forum", please refrain from doing so, just move on to the next question. Much appreciated.
Francois van der Merwe |
|
Back to top |
|
 |
diego_maradona21 |
Posted: Thu Jul 31, 2008 1:06 am Post subject: |
|
|
Novice
Joined: 24 Jul 2008 Posts: 17
|
yep i like the ideas:) gonna try it thanks;) |
|
Back to top |
|
 |
sridhsri |
Posted: Thu Jul 31, 2008 9:42 am Post subject: |
|
|
Master
Joined: 19 Jun 2008 Posts: 297
|
You might want to consider a design where you split this into two flows. The first flow extracts the rows from the DB and puts them on a queue. The second flow does the HTTP requests. By increasing the number of threads available to the second flow, you could achieve parallel processing. |
|
Back to top |
|
 |
|