camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajneesh <>
Subject Nested routing using rest and MQ processing asyncronously
Date Sat, 07 Jan 2017 16:01:11 GMT
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" />

<from uri="direct:handleRestCall" />
  <process ref="restRequestValidationProcessor" />
    <to uri="ref:mqueueEndpoint" />
    <to uri="bean:restCallResponserService?method=generateSuccessResponse"/>
      <process ref="exceptionProcessor"></process>

 <from uri="ref:mqueueEndpoint" />
  <process ref="msgProcessor"></process>

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message