camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pontus Ullgren <ullg...@gmail.com>
Subject Re: Nested routing using rest and MQ processing asyncronously
Date Sun, 08 Jan 2017 08:27:38 GMT
Hi,

If you don't want to wait for the reply from the queue you can use inOnly
to force a one way MEP.

Something like this
 <inOnly uri="ref:mqueueEndpoint" />

Best regards
Pontus

On Sat, 7 Jan 2017, 18:00 Rajneesh, <hi.its.rajneesh@gmail.com> wrote:

> I have a use case:
> 1. Client send the msg via rest endpoint
> 2. App need to get it, validate it, put in MQ, and send acknowledgement
> (message received) to client app in rest response.
> 3. MQ endpoint has its own route to offline processing of msg which
> triggers
> as soon as msg is in queue.
> 4. rest response can not wait till the MQ processing to be complete and has
> to go independently.
>
> Problem what I am facing is some time rest respone get delayed and
> stuck/meshed up with MQ processing and client is not getting response on
> given SLA.
>
> I have done nested routing Configuration in camel context like below.. not
> sure is it right way or not..but its not working as expected. Please
> advise:
>
> <restConfiguration component="servlet" bindingMode="off">
> <rest path="/">
>  <post uri="/messages" >
>  <to uri="direct:handleRestCall" />
>  </post>
> </rest>
>
> <route>
> <from uri="direct:handleRestCall" />
>   <process ref="restRequestValidationProcessor" />
>     <to uri="ref:mqueueEndpoint" />
>     <to
> uri="bean:restCallResponserService?method=generateSuccessResponse"/>
>     <onException>
>     <exception>java.lang.Exception</exception>
>      <handled>
>      <constant>true</constant>
>      </handled>
>       <process ref="exceptionProcessor"></process>
>     </onException>
> </route>
>
> <route>
>  <from uri="ref:mqueueEndpoint" />
>   <process ref="msgProcessor"></process>
> </route>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Nested-routing-using-rest-and-MQ-processing-asyncronously-tp5792279.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message