You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Shikha Singhal <si...@gmail.com> on 2017/05/10 05:15:03 UTC

How to suspend a particular request and resume later

Hi,I am receiving messages or requests from ActiveMQ and processing the
messages and creating another output file with respect to each input request
from ActiveMQ.My configurations are as given below:/                                                                           
${body}                                                                       
destinations                                    /I have a scenario where I
want to add incoming request to a waiting queue, instead of processing it.
Later after some time when one condition becomes true, I want to again start
processing the request from waiting queue. But I don't know how can I
achieve this. Kindly help.Thanks in advance.!RegardsShikha Singhal



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-suspend-a-particular-request-and-resume-later-tp5799187.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to suspend a particular request and resume later

Posted by souciance <so...@gmail.com>.
Perhaps there are good ways to do this technically, but in general I would
avoid keeping state in your integration layer. It will just introduce you
to a set of new problems when it comes to error handling and retry. You'd
be better off redesigning the solution without the wait if possible.

If you still want to do it, you could off course trigger a stop message
from another route to stop the "file creating" route. Once you have the
message then send a start message to start the route again to generate the
file.

On Wed, May 10, 2017 at 7:24 AM, Shikha Singhal [via Camel] <
ml+s465427n5799188h91@n5.nabble.com> wrote:

> In the given configurations i.e.
>
> <i><route>
>             <from uri="direct:processLifecycleEventRequest" />
>             <process ref="lifecycleProcessor" /><b>// Here in the process method I am adding request to waiting queue</b>
>             <split>
>                 <simple>${body}</simple>
>                 <b><process ref="reportProcessor" /></b>
>                 <recipientList>
>                     <header>destinations</header>
>                 </recipientList>
>             </split>
>         </route></i>
>
>
> Once I get this request back form waiting queue, I want to resume or start
> remaing configurations, which are responsible for creating an output file
> (i.e. given in split tag).
>
> Any help will be appreciated.
>
> Thanks & Regards
> Shikha Singhal
>
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/How-to-suspend-a-
> particular-request-and-resume-later-tp5799187p5799188.html
> To start a new topic under Camel - Users, email ml+s465427n465428h31@n5.
> nabble.com
> To unsubscribe from Camel - Users, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://camel.465427.n5.nabble.com/How-to-suspend-a-particular-request-and-resume-later-tp5799187p5799195.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to suspend a particular request and resume later

Posted by Shikha Singhal <si...@gmail.com>.
In the given configurations i.e.



Once I get this request back form waiting queue, I want to resume or start
remaing configurations, which are responsible for creating an output file
(i.e. given in split tag). 

Any help will be appreciated.

Thanks & Regards
Shikha Singhal






--
View this message in context: http://camel.465427.n5.nabble.com/How-to-suspend-a-particular-request-and-resume-later-tp5799187p5799188.html
Sent from the Camel - Users mailing list archive at Nabble.com.