Re: How to make a copy an Exchange in a Route segment

2014-01-09 Thread duncanto
Yeah it should work ... but not within the choice() .. the change in the multicast recipient still effect the main message. .choice() .when(header("foo").isEqualTo("myfoo")) // Is there a DSL definition I can add here to create a copy of the message exchange //

Re: ClassCastException marshalling cxf message

2014-01-09 Thread Christian Posta
Looking at the camel code, this doesn't look like it should happen. The XStream converters deal with streams, which eventually end up as byte[]... and the CxfConverter converts this to MessageContentsList: https://github.com/apache/camel/blob/master/components/camel-cxf/src/main/java/org/apache/ca

Re: Handling ConnectException at route startup

2014-01-09 Thread Claus Ibsen
You can use the bridge error handler on the consumer. See details at http://camel.apache.org/why-does-my-file-consumer-not-pick-up-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.html On Thu, Jan 9, 2014 at 5:00 PM, Christian Posta wrote: > Take a look at http://camel.a

Re: How to make a copy an Exchange in a Route segment

2014-01-09 Thread Claus Ibsen
You can use multicast On Thu, Jan 9, 2014 at 4:09 PM, duncanto wrote: > Thanks for your suggestions .. which Ive tried but without success ... > > Ill clarify the problem with some noddy route code .. > > Cheers > > > context.addRoutes(new RouteBuilder() { > public void co

Re: Handling ConnectException at route startup

2014-01-09 Thread Christian Posta
Take a look at http://camel.apache.org/polling-consumer.html and the pollingStrategy option. This will work for file/ftp components. The JMS component will have its own errorHandler. http://camel.apache.org/jms.html There is no "global exception handler" to handle exceptions outside of the routes

Re: Passing a reference of MyObject to a bean

2014-01-09 Thread Richard Kettelerij
What you can do is store MyObject as a property on the exchange and pass this property as a variable to the process method. E.g: from( "file:./src/inbox").setProperty("myobj", constant(myObject)).bean( MyBean.class, "process(${property.myobj})" ).to( "file:./src/outbox" ); Regards, Richard On T

Re: How to make a copy an Exchange in a Route segment

2014-01-09 Thread duncanto
Thanks for your suggestions .. which Ive tried but without success ... Ill clarify the problem with some noddy route code .. Cheers context.addRoutes(new RouteBuilder() { public void configure() throws Exception { from("direct:start")

Re: Master Slave Camel-ActiveMQ

2014-01-09 Thread Henryk Konsek
> I couldn't resist and summarized different ways for achieving master slave > configurations in a blog post here > > http://www.ofbizian.com/2014/01/masterslave-failover-for-camel-routes.html Great summary Bilgin. Kudos :) . -- Henryk Konsek http://henryk-konsek.blogspot.com

Re: Handling ConnectException at route startup

2014-01-09 Thread baudoust
Ok I catch the point, we do have the same behaviour in our implementation, which is not a good news at all ... I guess the application server, if any in this case, catch the exception, in our case we are runing under websphere and the error appears in the websphere log, but not is not catch by our

Re: Stream consuming in Camel

2014-01-09 Thread Henryk Konsek
> I have a use case where one of my thread is outputting data to a stream. > I need a camel consumer which consumes this stream from that thread Consider using stream [1] component reading from URL. You'll need to create custom URL handler [1] to consume the data from your thread. from("stream:yo

Passing a reference of MyObject to a bean

2014-01-09 Thread Chirag Dewan
Hi all, This may be a very straight forward thing,but I was not able to find it. I have a route like: public class MyRouteBuilder extends RouteBuilder {     private MyObject myObject;     public MyRouteBuilder(MyObject myObject)     {         this.myObject = myObject;     }     @Override  

Re: How to make a copy an Exchange in a Route segment

2014-01-09 Thread Claus Ibsen
You can take a look at some of these eips - wire tap - multicast or recipient list (with custom agg strategy if you want to "merge" result) - content enricher On Thu, Jan 9, 2014 at 10:25 AM, duncanto wrote: > > In Camel, how do you make a copy of an message exchange to be used in a > route bl

Re: Handling ConnectException at route startup

2014-01-09 Thread bijoy
Hi Baudoust, I want to configure the routes dynamically with Spring DSL. Whatever you mentioned is achieved putting under context scope as below... * java.lang.Exception true true *

Re: How to make a copy an Exchange in a Route segment

2014-01-09 Thread Richard Kettelerij
Take a look at ExchangeHelper, http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/util/ExchangeHelper.html. It has a couple of copy-methods. On Thu, Jan 9, 2014 at 10:25 AM, duncanto wrote: > > In Camel, how do you make a copy of an message exchange to be used in a > rout

Re: Handling ConnectException at route startup

2014-01-09 Thread baudoust
Hi, what if you declare a general handling in a super class like : public abstract class CommonHandler extends RouteBuilder { @Override public void configure() throws Exception { // default Technical Exception handling onException(Exception.class)

Problem with Netty while broadcasting an UDP packet

2014-01-09 Thread Cristiano Costantini
Hi All, I'm trying to send a UDP broadcast packet using Netty Camel component. I'm sending the UDP packet to producer endpoint "netty:udp:// 192.168.3.255:?broadcast=true&sync=false" (my network has mask 255.255.255.0) but I get the following exception: java.io.IOException: Permission denied

Re: Distributed AggregationRepository

2014-01-09 Thread Raul Kripalani
Hi Claus, On Thu, Jan 9, 2014 at 8:42 AM, Claus Ibsen wrote: > Hmm I am not aware of such. > > camel-levedb is using same principle as the leveldb store in AMQ > http://activemq.apache.org/leveldb-store.html > > And allows concurrent and distributed reads/writes to the shared > store. eg use a s

ClassCastException marshalling cxf message

2014-01-09 Thread Mario Fusco
Hi, I am one of the core developer of Drools and I am trying to debug and fix a problem reported by one of our user in this email http://drools.46999.n3.nabble.com/Drools-6-0-1-xstream-marshaling-via-camel-config-not-working-td4027607.html I can reproduce the issue he reported, but not being a C

Re: twitter version updated to v1.1

2014-01-09 Thread sergio besada
Hi, I'm servicemix 4.5's user and I had this problem. I couldn´t publish messages on Twitter because Twitter changed the api version from v1 to v1.1, but I have solved this problem only upgrading the bundle org.apache.servicemix.bundles.twitter4j-3.0.3_1.jar on my servicemix 4.5. Regards --

How to make a copy an Exchange in a Route segment

2014-01-09 Thread duncanto
In Camel, how do you make a copy of an message exchange to be used in a route block or a sub-route. I want to have a a local copy of the Exchange in the block / sub-route in a synchronous flow whereby changes/removes to the headers and message body are made, but do not affect the message exchange

Re: File component and include option

2014-01-09 Thread geppo
Thank you Christian, unfortunately I've just realised that we use Camel 2.9 and antInclude is only available from 2.10 onwards. -- View this message in context: http://camel.465427.n5.nabble.com/File-component-and-include-option-tp5745730p5745776.html Sent from the Camel - Users mailing list ar

Re: Distributed AggregationRepository

2014-01-09 Thread Claus Ibsen
On Wed, Jan 8, 2014 at 5:41 PM, Raul Kripalani wrote: > Careful, HawtDB is deprecated, as advertised in the camel-hawtdb component > page. Unfortunately, the warning doesn't render in a shaded box any longer > (due to some recent Confluence migration), so it's easy to miss it. Sorry > about that.

Re: Handling ConnectException at route startup

2014-01-09 Thread bijoy
Hi, Following is the sample code for camel configuration in spring dsl java.lang.Exception true true ftp://localhost:2121?username=admin;password=admin;file

Re: Measuring time to make call to custom endpoint

2014-01-09 Thread Claus Ibsen
Hi Take a look at event notifier as you got it out of the box then http://camel.apache.org/eventnotifier-to-log-details-about-all-sent-exchanges.html On Wed, Jan 8, 2014 at 11:50 PM, gilboy wrote: > Hi > > I have a simple route defined in the Spring DSL. > > > > > > >