Re: Question on VM Endpoint, multipleConsumers and OSGi

2012-02-04 Thread vivekvasudeva
Hey, I have a very similar issue ...of multipleConsumers not working as expected //Master class from(jmx:.xyz) .log("master" + $body) .to(seda:myq?multipleConsumers=true) // Consumer class from("seda:myq).routeId(consumerId) .log(consumerId + $body) only the 1st consumer gets the message and

Re: Camel Request-Reply pattern

2012-02-04 Thread Christian Schneider
The descriptions on this page may help you. They describe the request reply pattern when using several processors and also how the reply goes back to the from. http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html To make it short you can use a transform easily. The camel-cxf c

Re: File consumer - waiting for it to start

2012-02-04 Thread Babak Vahdat
Just realized that the behavior you see is consistent with the documentation [1] which clearly states that the onCompletion logic runs *concurrently* and *not* in the main thread (I did not know that). While you run your test method shouldCopyFromSourceToDestination() it runs inside the JVM *main*

Camel Request-Reply pattern

2012-02-04 Thread wanggang1
Hi, I'm new with Camel. I have tried to search the web for an answer but could not come up with one. Here is my question. I need to route a http request to a Web Service. The http request is in existing application so I could not change its nature(i.e. async). My thinking is that I need to us

Re: File consumer - waiting for it to start

2012-02-04 Thread Larry Meadors
Same result - works with the sleep; fails without it...which seems odd - I wonder if it's a result of using the onCompletion() stuff to shut things down. I added some logging to see what's happening. Without the sleep call it looks like this: [thread #0] INFO 2012-02-04 10:43:16,646: shutting d

Re: File consumer - waiting for it to start

2012-02-04 Thread Babak Vahdat
Make use of template.requestBodyAndHeaders() instead of template.sendBodyAndHeaders(). Babak -- View this message in context: http://camel.465427.n5.nabble.com/File-consumer-waiting-for-it-to-start-tp5455062p5456440.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: File consumer - waiting for it to start

2012-02-04 Thread Larry Meadors
On Sat, Feb 4, 2012 at 6:49 AM, Babak Vahdat wrote: > Of course the best way to verify it, is to use Camel test toolkit [1] and > check if it does functionally what you expect it to do. Thanks - that's a great idea - I've got a unit test for it, but how can I simulate onCompletion from it? I'm ex

Re: File consumer - waiting for it to start

2012-02-04 Thread Babak Vahdat
Yeah your code snippet seems reasonable to me and is one possible way to go for it. Of course the best way to verify it, is to use Camel test toolkit [1] and check if it does functionally what you expect it to do. [1] http://camel.apache.org/testing.html Babak -- View this message in context:

Bindy CSV parser uses default encoding

2012-02-04 Thread Thomas Letsch
Hi, the bindy csv component uses the default encoding when importing a file Class org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat Line 115: - InputStreamReader in = new InputStreamReader(inputStream); + InputStreamReader in = new InputStreamReader(inputStream, IOConverter.getCharsetName(e

TypeConverterLoaderException with ActiveMQ route in OSGi

2012-02-04 Thread MarkD
Hi all, I've got a problem with an OSGi app that adds some route via a ServiceFactory using Spring to define the beans and manage the services. I think it began after I moved to the latest Camel version (2.8 and up). The routes are no longer started and therefore only exist as RouteDefinitions in

Re: File consumer - waiting for it to start

2012-02-04 Thread Babak Vahdat
Hi Larry, I decided to make it real, so following a working example for your usecase: I did take an already existing Camel example [1] and modified it [2]. You can run the class either directly inside your IDE or through Maven: mvn exec:java -Dexec.mainClass=org.apache.camel.example.spring.MyRou

Re: Exception handling: Processor and Spring DSL

2012-02-04 Thread Samuel Cox
On 2012-02-03 4:58 PM, Babak Vahdat wrote: Instead of using a ProducerTemplate it would be much easier to do a to("...") to fire an exchange into your second route inside the same camel context. Those were my exact words to my colleague:) He told me that the separate ProducerTemplate was used

Re: File consumer - waiting for it to start

2012-02-04 Thread Babak Vahdat
You don't have to kill the process by hand using "kill -9" :-) You can still make use of the way described in the link I sent you already. Then do consume files with sendEmptyMessageWhenIdle option [1] and then see how to shutdown your application [2] when *you* detect there're no more files to co

Re: Synchronize within multicast

2012-02-04 Thread Matt Narrell
And/or a seda route with an InOnly ExchangePattern might work. On Feb 3, 2012, at 9:17 AM, Claus Ibsen wrote: > The Wire Tap EIP pattern > > On Fri, Feb 3, 2012 at 5:51 PM, Apache wrote: >> Multicast caller thread still blocks on everything within the multicast >> block. >> Basically I am look