You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by realice <re...@gmail.com> on 2012/10/02 16:30:44 UTC

aggregator question: how do I send reply back to the requestor

i have a cxf endpoint in the front which sends request to queue with
exchangepattern as InOut, and in my aggregator i'm trying aggregate the
responses from the reply queue and send the response back to the cxf
endpoint. My question is what should i specify in the to uri in order for
the aggregated response to go back to cxf endpoint, can anyone help? thanks 

<route>
  <from uri="jms:QUEUENAME"/>
 <aggregate strategyRef="aggregatorStrategy" completionSize="3"
completionTimeout="1000">
 <correlationExpression>
  <header>JMSCorrelationID</header> 
  </correlationExpression>
   
  </aggregate>
  </route>



--
View this message in context: http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: aggregator question: how do I send reply back to the requestor

Posted by realice <re...@gmail.com>.
Thanks for the explanation, an external component is listening on the TOQUEUE
which in return sends responses back to the REPLYQUEUE, are you saying the
external component should set a jmsreplyto header as well? if so what should
it be?

thanks



--
View this message in context: http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5720479.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: aggregator question: how do I send reply back to the requestor

Posted by Raul Kripalani <ra...@evosent.com>.
Well, it seems like you send a message to TOQUEUE. There must be a
component X listening on TOQUEUE (whose code you haven't posted - hence I'm
calling it 'X'), which does something to the message and sends a reply on
REPLYQUEUE. Are you sure this what you're pursuing?

The aggregation route listening on REPLYQUEUE will *not* send a reply back
if component X doesn't in turn set a JMSReplyTo header when it sends the
message to REPLYQUEUE. Bear in mind that, in order to get the result of the
aggregation, component X must tell Camel where it wishes to get the reply.
Otherwise you can't expect Camel to reply because it doesn't know where to
send the message, thus it acts InOnly.

It's all a bit too tangled and hard to explain without a diagram, but I
hope I'm getting my point across nevertheless ;)

Regards,

---
*Raúl Kripalani*
Apache Camel Committer
Enterprise Architect, Program Manager, Open Source Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk <http://twitter.com/raulvk>

On Tue, Oct 2, 2012 at 6:18 PM, realice <re...@gmail.com> wrote:

> Hi, i do the aggregation bean and if i put something like <to
> uri="mock:aggregated"/> in the aggregation route, it seems to load up ok.
> my
> full xml is too ugly to post, so i'm just posting the route, thanks again
>
> <when>
>                      <simple>${in.header.operationName} == 'A'</simple>
>                      <log message="Got ${in.header.operationName}"/>
>                      <split>
>                         <
>                         <method bean="B" method="methodB"/>
>
>                         <process ref="CProcessor"/>
>
>                         <setHeader headerName="CamelJmsDestinationName">
>
> <constant>queue:///TOQUEUE?targetClient=1</constant>
>                                         </setHeader>
>                                          <setHeader
> headerName="CamelJmsDestinationName">
>
> <constant>queue:///REPLYQUEUE?targetClient=1</constant>
>                                         </setHeader>
>                         <to uri="jms:TOQUEUE?replyTo=REPLYQUEUE"/>
>
>                     </split>
>                  </when>
>
> <route>
>   <from uri="jms:REPLYQUEUE"/>
>  <aggregate strategyRef="aggregatorStrategy" completionSize="1"
> completionTimeout="1000">
>  <correlationExpression>
>   <header>JMSCorrelationID</header>
>   </correlationExpression>
>   </aggregate>
>   </route>
>
> <bean id="aggregatorStrategy" class="com.strategy"/>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5720382.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: aggregator question: how do I send reply back to the requestor

Posted by realice <re...@gmail.com>.
Hi, i do the aggregation bean and if i put something like <to
uri="mock:aggregated"/> in the aggregation route, it seems to load up ok. my
full xml is too ugly to post, so i'm just posting the route, thanks again

<when>
	             <simple>${in.header.operationName} == 'A'</simple>
	             <log message="Got ${in.header.operationName}"/>
	             <split>
	                <
	                <method bean="B" method="methodB"/>
	                
	                <process ref="CProcessor"/>
	                
	                <setHeader headerName="CamelJmsDestinationName">
						<constant>queue:///TOQUEUE?targetClient=1</constant>
					</setHeader> 
					 <setHeader headerName="CamelJmsDestinationName">
						<constant>queue:///REPLYQUEUE?targetClient=1</constant>
					</setHeader> 
	                <to uri="jms:TOQUEUE?replyTo=REPLYQUEUE"/>
	                
	            </split>
	         </when>

<route>
  <from uri="jms:REPLYQUEUE"/>
 <aggregate strategyRef="aggregatorStrategy" completionSize="1"
completionTimeout="1000">
 <correlationExpression>
  <header>JMSCorrelationID</header> 
  </correlationExpression>
  </aggregate>
  </route>

<bean id="aggregatorStrategy" class="com.strategy"/> 




--
View this message in context: http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5720382.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: aggregator question: how do I send reply back to the requestor

Posted by Scott England-Sullivan <su...@gmail.com>.
May seem like a silly question but you do have a bean definition for "
aggregatorStrategy"?

Can you post your complete XML?

On Tue, Oct 2, 2012 at 10:47 AM, realice <re...@gmail.com> wrote:

> I get the following exception if i don't specify to uri in the aggregate:
> Definition has no children on Aggregate, many thanks
>
> 2012-10-02 11:44:00.827::WARN:  Failed startup of context
> org.mortbay.jetty.webapp.WebAppContext@1887dd5{}
> org.apache.camel.RuntimeCamelException:
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> route2
> at: >>> Aggregate[JMSCorrelationID -> []] <<< in route:
> Route[[From[jms:QUEUENAME]] -> [Aggregate[J... because of Definition has no
> children on Aggregate[JMSC
>         at
>
> org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1280)
>         at
>
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)
>         at
>
> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:280)
>         at
>
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
>         at
>
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:324)
>         at
>
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:934)
>         at
>
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
>         at
>
> org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
>         at
>
> org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
>         at
>
> org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
>         at
>
> org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:511)
>         at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
>         at
>
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1191)
>         at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:481)
>         at
> org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:434)
>         at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
>         at
>
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
>         at
>
> org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:120)
>         at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
>         at
>
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
>         at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
>         at org.mortbay.jetty.Server.doStart(Server.java:210)
>         at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
>         at
>
> org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:134)
>         at
>
> org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:332)
>         at
>
> org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:277)
>         at
>
> org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:195)
>         at
> org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:183)
>         at
>
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
>         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>         at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>         at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>         at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>         at
>
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>         at
>
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>         at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
> route route2 at: >>> Aggregate[JMSCorrelationID -> []] <<< in route:
> Route[[From[jms:QUEUENAME]] -> [Aggregate[J... because of Definition has no
> children on Aggregate[JMSCorrelationID -> []]
>         at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:873)
>         at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:171)
>         at
>
> org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:712)
>         at
>
> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1749)
>         at
>
> org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1542)
>         at
>
> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1427)
>         at
>
> org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:179)
>         at
> org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
>         at
>
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1395)
>         at
>
> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:228)
>         at
>
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:118)
>         ... 48 more
> Caused by: java.lang.IllegalArgumentException: Definition has no children
> on
> Aggregate[JMSCorrelationID -> []]
>         at
>
> org.apache.camel.model.ProcessorDefinition.createChildProcessor(ProcessorDefinition.java:153)
>         at
>
> org.apache.camel.model.AggregateDefinition.createAggregator(AggregateDefinition.java:153)
>         at
>
> org.apache.camel.model.AggregateDefinition.createProcessor(AggregateDefinition.java:149)
>         at
>
> org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:441)
>         at
>
> org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:179)
>         at
> org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:870)
>         ... 58 more
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5720380.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
-- 
Scott England-Sullivan
Apache Camel Committer
Principal Consultant / Sr. Architect | Red Hat, Inc.
FuseSource is now part of Red Hat
Web:     fusesource.com <http://www.fusesource.com> |
redhat.com<http://www.redhat.com>
Blog:     sully6768.blogspot.com
Twitter: sully6768

Re: aggregator question: how do I send reply back to the requestor

Posted by realice <re...@gmail.com>.
I get the following exception if i don't specify to uri in the aggregate:
Definition has no children on Aggregate, many thanks

2012-10-02 11:44:00.827::WARN:  Failed startup of context
org.mortbay.jetty.webapp.WebAppContext@1887dd5{}
org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route route2
at: >>> Aggregate[JMSCorrelationID -> []] <<< in route:
Route[[From[jms:QUEUENAME]] -> [Aggregate[J... because of Definition has no
children on Aggregate[JMSC
        at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1280)
        at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)
        at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:280)
        at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
        at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:324)
        at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:934)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
        at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
        at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:511)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
        at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1191)
        at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:481)
        at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:434)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:120)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
        at org.mortbay.jetty.Server.doStart(Server.java:210)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at
org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:134)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:332)
        at
org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:277)
        at
org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:195)
        at
org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:183)
        at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create
route route2 at: >>> Aggregate[JMSCorrelationID -> []] <<< in route:
Route[[From[jms:QUEUENAME]] -> [Aggregate[J... because of Definition has no
children on Aggregate[JMSCorrelationID -> []]
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:873)
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:171)
        at
org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:712)
        at
org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1749)
        at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1542)
        at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1427)
        at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:179)
        at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)
        at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1395)
        at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:228)
        at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:118)
        ... 48 more
Caused by: java.lang.IllegalArgumentException: Definition has no children on
Aggregate[JMSCorrelationID -> []]
        at
org.apache.camel.model.ProcessorDefinition.createChildProcessor(ProcessorDefinition.java:153)
        at
org.apache.camel.model.AggregateDefinition.createAggregator(AggregateDefinition.java:153)
        at
org.apache.camel.model.AggregateDefinition.createProcessor(AggregateDefinition.java:149)
        at
org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:441)
        at
org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:179)
        at
org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:870)
        ... 58 more



--
View this message in context: http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5720380.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: aggregator question: how do I send reply back to the requestor

Posted by Scott England-Sullivan <su...@gmail.com>.
Hello,

The Camel JMS component will automatically handle a message that is sent as
an InOut by a Camel JMS Producer.  The producer will include the JMSReplyTo
which is a key indicator to the Camel JMS Consumer endpoint to make the
exchange an InOut on the consumer.  So you shouldn't have to do anything.

Have you tried it and if so, are you getting an error?

If not just make sure you read over the
http://camel.apache.org/jms.htmlsection Request-Reply over JMS
section.  Lots of good hints especially if
you are setting up a request-reply pattern over a cluster of brokers.

Best Regards,
Scott ES

On Tue, Oct 2, 2012 at 9:30 AM, realice <re...@gmail.com> wrote:

> i have a cxf endpoint in the front which sends request to queue with
> exchangepattern as InOut, and in my aggregator i'm trying aggregate the
> responses from the reply queue and send the response back to the cxf
> endpoint. My question is what should i specify in the to uri in order for
> the aggregated response to go back to cxf endpoint, can anyone help? thanks
>
> <route>
>   <from uri="jms:QUEUENAME"/>
>  <aggregate strategyRef="aggregatorStrategy" completionSize="3"
> completionTimeout="1000">
>  <correlationExpression>
>   <header>JMSCorrelationID</header>
>   </correlationExpression>
>
>   </aggregate>
>   </route>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
-- 
Scott England-Sullivan
Apache Camel Committer
Principal Consultant / Sr. Architect | Red Hat, Inc.
FuseSource is now part of Red Hat
Web:     fusesource.com <http://www.fusesource.com> |
redhat.com<http://www.redhat.com>
Blog:     sully6768.blogspot.com
Twitter: sully6768

Re: aggregator question: how do I send reply back to the requestor

Posted by James Carman <ja...@carmanconsulting.com>.
I would try to get something working without aggregation for now.
Just so you get a feel for how it all works.  Once you get that
working, then I'd add in the idea of aggregation.

On Fri, Oct 12, 2012 at 10:31 PM, realice <re...@gmail.com> wrote:
> so basically  <to uri ="jms:toQUEU"/><aggregate ...></aggregate>, the
> aggregate should able to process the replies coming back from the fixed
> reply queue specified in the jmscomponent?
>
> thanks
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5720984.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: aggregator question: how do I send reply back to the requestor

Posted by realice <re...@gmail.com>.
so basically  <to uri ="jms:toQUEU"/><aggregate ...></aggregate>, the
aggregate should able to process the replies coming back from the fixed
reply queue specified in the jmscomponent?

thanks



--
View this message in context: http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5720984.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: aggregator question: how do I send reply back to the requestor

Posted by James Carman <ja...@carmanconsulting.com>.
You don't have to specify the return trip.  Take a look at this test case:

http://svn.apache.org/repos/asf/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsInOutWithNoOutBodyTest.java


On Fri, Oct 12, 2012 at 4:26 PM, realice <re...@gmail.com> wrote:
> so at the end <from uri ="jms:queueName"/> <to uri="cxfendpoint"/> should
> work? thanks
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5720981.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: aggregator question: how do I send reply back to the requestor

Posted by realice <re...@gmail.com>.
so at the end <from uri ="jms:queueName"/> <to uri="cxfendpoint"/> should
work? thanks



--
View this message in context: http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5720981.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: aggregator question: how do I send reply back to the requestor

Posted by James Carman <ja...@carmanconsulting.com>.
Have you tried it without supporting aggregation?  Try the simple case
and then add complexity once you get that working.

On Fri, Oct 12, 2012 at 3:07 PM, realice <re...@gmail.com> wrote:
> I drew a picture, hope the gurus can help me out here, many thanks
> <http://camel.465427.n5.nabble.com/file/n5720978/question.jpg>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5720978.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: aggregator question: how do I send reply back to the requestor

Posted by realice <re...@gmail.com>.
I drew a picture, hope the gurus can help me out here, many thanks
<http://camel.465427.n5.nabble.com/file/n5720978/question.jpg> 



--
View this message in context: http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5720978.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: aggregator question: how do I send reply back to the requestor

Posted by "Willem.Jiang" <wi...@gmail.com>.
Hi,

Did you have any chance to take a look at the loan broker example[1]?
Basically you just need to setup right aggregation strategy to put the
response message together.

[1]http://camel.apache.org/loan-broker-example.html

Willem



--
View this message in context: http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5721040.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: aggregator question: how do I send reply back to the requestor

Posted by realice <re...@gmail.com>.
can anyone help me out here? basically a cxf endpoint request going to
request queue and I specify the replyqueue, bunch of messages arrive at
response queue, I need to aggregate the responses and make it send a
response back as a reply to cxf endpoint. many thanks



--
View this message in context: http://camel.465427.n5.nabble.com/aggregator-question-how-do-I-send-reply-back-to-the-requestor-tp5720377p5720972.html
Sent from the Camel - Users mailing list archive at Nabble.com.