Re: REST InOut with JMS InOnly

2015-02-05 Thread James Green
That's where I ended up too. I was minded to make onPrepare a fragment for embedding into wiretap too however one might imagine that someone using wiretap does not want to modify the exchange based on individual onward paths. So in our case multicast() may be more appropriate with stopOnException(

Re: REST InOut with JMS InOnly

2015-02-05 Thread Morgan Hautman
James, It seems to be documented here: http://camel.apache.org/multicast.html (end of page) And the class they use: https://github.com/apache/camel/blob/master/camel-core/src/test/java/org/apache/camel/processor/AnimalDeepClonePrepare.java Regards, Morgan On 5/02/2015 10:38, James Green wrot

Re: REST InOut with JMS InOnly

2015-02-05 Thread James Green
Yes this is the simple bit. The not so simple bit is appreciating what happens under the hood. wiretap, quite rightly, sends the same object references down each path. If one of those paths mutates the Exchange's Message, the other routes will spot the change and the developer gets a rude surprise

Re: REST InOut with JMS InOnly

2015-02-03 Thread Claus Ibsen
On Tue, Feb 3, 2015 at 2:30 PM, James Green wrote: > Nope :) > > rest("/from-smtp/") > .post() > .type(EmailedSmsRequest.class) > .to("direct:fromSmtp"); > > direct:fromSmtp routes onward to direct:router. direct:router sends it > onwards to jms:queue:foo asynchronously. Th

Re: REST InOut with JMS InOnly

2015-02-03 Thread James Green
Nope :) rest("/from-smtp/") .post() .type(EmailedSmsRequest.class) .to("direct:fromSmtp"); direct:fromSmtp routes onward to direct:router. direct:router sends it onwards to jms:queue:foo asynchronously. The route that reads from("direct:router") is intended for be fully re

Re: REST InOut with JMS InOnly

2015-02-03 Thread Morgan Hautman
Yes I understand we can encounter a timeout when we don't respond to http/rest because it's synchronous. But I think what James means is : 1st route: from(cxf:...).to(activemq:bar) 2nd route from(activemq: bar).to(processing) The first route sends a message to the second route through activem

Re: REST InOut with JMS InOnly

2015-02-03 Thread Claus Ibsen
On Tue, Feb 3, 2015 at 1:27 PM, Morgan Hautman wrote: > Claus, > > Is their any way a queue (using activemq) could respond , like a > request-reply mechanism? > > http://camel.apache.org/request-reply.html > Not sure I follow. Camel can do InOnly and InOut over JMS. So yeah both is possible. Jus

Re: REST InOut with JMS InOnly

2015-02-03 Thread James Green
Surely its the job of the queue consumer to reply, not ActiveMQ? On 3 February 2015 at 12:27, Morgan Hautman wrote: > Claus, > > Is their any way a queue (using activemq) could respond , like a > request-reply mechanism? > > http://camel.apache.org/request-reply.html > > > On 3/02/2015 13:14, Cl

Re: REST InOut with JMS InOnly

2015-02-03 Thread Morgan Hautman
Claus, Is their any way a queue (using activemq) could respond , like a request-reply mechanism? http://camel.apache.org/request-reply.html On 3/02/2015 13:14, Claus Ibsen wrote: Hi You can send the message to the JMS as InOnly or use WireTap On Tue, Feb 3, 2015 at 12:27 PM, James Green w

Re: REST InOut with JMS InOnly

2015-02-03 Thread Claus Ibsen
Hi You can send the message to the JMS as InOnly or use WireTap On Tue, Feb 3, 2015 at 12:27 PM, James Green wrote: > I have two routes: > > 1. A rest dsl accepting data from HTTP clients and sending it to the route > below before replying to the client > 2. A "backend" route that receives an Ex

REST InOut with JMS InOnly

2015-02-03 Thread James Green
I have two routes: 1. A rest dsl accepting data from HTTP clients and sending it to the route below before replying to the client 2. A "backend" route that receives an Exchange and sends it to a JMS queue By default, although the JMS queue gets the message, a stack trace occurs because the queue