You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bijoy <bi...@gmail.com> on 2014/03/11 07:02:13 UTC
Seda does not work with CXFRS
I'm planning to create a REST web service using CXFRS component and want to
deploy the service on external Jetty container. I want the web service to
work in async mode, so I acknowledge the request with interim response and
then pass the request a processor using seda component. Following are the
route configurations...
*<bean id="customRoutePolicy" class="sample.CustomRoutePolicy"/>
<bean id="mainProcess" class="sample.MainProcessor"/>
<camel:camelContext id="sampleContext" autoStartup="false"
streamCache="true">
<camel:route id="asyncProcessor" routePolicyRef="customRoutePolicy"
startupOrder="1">
<camel:from uri="seda:mainProcessor?purgeWhenStopping=true"/>
<camel:process ref="mainProcess"/>
</camel:route>
<camel:route id="asyncRESTReq" routePolicyRef="edmRoutePolicy"
startupOrder="2">
<camel:from
uri="cxfrs:bean:restServer?bindingStyle=SimpleConsumer"/>
<camel:to
uri="seda:mainProcessor?waitForTaskToComplete=Never&failIfNoConsumers=true"/>
<camel:transform><camel:constant>This is temporary REST
response</camel:constant></camel:transform>
</camel:route>
</camel:camelContext>*
As per log, Both the routes are starting fine and I'm sending a http request
temporary response is sent back to client. But the request is not being
transferred to seda component. Setting failIfNoConsumers=true generates
following exception and does not send temporary response to client...
*No consumers available on endpoint:
Endpoint[seda://mainProcessor?failIfNoConsumers=true&waitForTaskToComplete=Never].
Exchange[Message: 5]
2014-03-11T11:25:48.813+0530 [qtp342295918-10] DEBUG
o.a.camel.processor.PipelineHelper:76 continueProcessing Message exchange
has failed: so breaking out of pipeline for exchange: Exchange[Message:
Execption has occurred [OUT]...exiting this route!!!] Handled by the error
handler.*
It seems the seda consumer is coming up. Any idea why this could happen?
--
View this message in context: http://camel.465427.n5.nabble.com/Seda-does-not-work-with-CXFRS-tp5748598.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Seda does not work with CXFRS--SOLVED
Posted by bijoy <bi...@gmail.com>.
I have figured out the issue. For testing some use cases I kept
autoStartup=false w.hich was not starting up the routes automatically. Even
though "asyncRESTReq" route was getting started somehow. Setting
autoStartup=true solved the problem and everything is working fine now.
Thanks a lot!
--
View this message in context: http://camel.465427.n5.nabble.com/Seda-does-not-work-with-CXFRS-tp5748598p5748627.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Seda does not work with CXFRS
Posted by Claus Ibsen <cl...@gmail.com>.
What Camel version do you use?
And what do you do in that custom route policy? And have you tried
without the route policy?
And Camel ought to say in the logs when it startup which routes /
consumers are started. Don't you see that from the seda?
On Tue, Mar 11, 2014 at 7:02 AM, bijoy <bi...@gmail.com> wrote:
> I'm planning to create a REST web service using CXFRS component and want to
> deploy the service on external Jetty container. I want the web service to
> work in async mode, so I acknowledge the request with interim response and
> then pass the request a processor using seda component. Following are the
> route configurations...
>
> *<bean id="customRoutePolicy" class="sample.CustomRoutePolicy"/>
> <bean id="mainProcess" class="sample.MainProcessor"/>
> <camel:camelContext id="sampleContext" autoStartup="false"
> streamCache="true">
> <camel:route id="asyncProcessor" routePolicyRef="customRoutePolicy"
> startupOrder="1">
> <camel:from uri="seda:mainProcessor?purgeWhenStopping=true"/>
> <camel:process ref="mainProcess"/>
> </camel:route>
> <camel:route id="asyncRESTReq" routePolicyRef="edmRoutePolicy"
> startupOrder="2">
> <camel:from
> uri="cxfrs:bean:restServer?bindingStyle=SimpleConsumer"/>
> <camel:to
> uri="seda:mainProcessor?waitForTaskToComplete=Never&failIfNoConsumers=true"/>
> <camel:transform><camel:constant>This is temporary REST
> response</camel:constant></camel:transform>
> </camel:route>
> </camel:camelContext>*
>
> As per log, Both the routes are starting fine and I'm sending a http request
> temporary response is sent back to client. But the request is not being
> transferred to seda component. Setting failIfNoConsumers=true generates
> following exception and does not send temporary response to client...
>
> *No consumers available on endpoint:
> Endpoint[seda://mainProcessor?failIfNoConsumers=true&waitForTaskToComplete=Never].
> Exchange[Message: 5]
> 2014-03-11T11:25:48.813+0530 [qtp342295918-10] DEBUG
> o.a.camel.processor.PipelineHelper:76 continueProcessing Message exchange
> has failed: so breaking out of pipeline for exchange: Exchange[Message:
> Execption has occurred [OUT]...exiting this route!!!] Handled by the error
> handler.*
>
> It seems the seda consumer is coming up. Any idea why this could happen?
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Seda-does-not-work-with-CXFRS-tp5748598.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io
Re: Seda does not work with CXFRS
Posted by bijoy <bi...@gmail.com>.
*Typo* -> It seems the seda consumers is not coming up.
--
View this message in context: http://camel.465427.n5.nabble.com/Seda-does-not-work-with-CXFRS-tp5748598p5748599.html
Sent from the Camel - Users mailing list archive at Nabble.com.