Re: aggregator issue

2012-11-30 Thread Henryk Konsek
I want to merge the message bodies into a container object. I would use GroupedExchangeAggregationStrategy and then forward the results of the aggregation to the processor. from(direct:aggregateMe). aggregate(constant(true),new GroupedExchangeAggregationStrategy()). completionSize(2).

Transactions, Error, Stop route

2012-11-30 Thread Praan
Dear All, I would like to discuss/have some advice on the following: Functional requirement: In case an error occurs in our route while while processing a message from ActiveMQ queue. We want the message to return back to the queue and the route to stop working. Technically we think we need a

Spring Transaction Propagating?

2012-11-30 Thread tolk
I have a situation similar to the simplified example below. Basically, I'm trying to use camel on an internal service to send an async message to itself via the SEDA component - a little odd perhaps but I don't have any choice in this: public class MyServiceImpl { ProducerTemplate

Re: Spring Transaction Propagating?

2012-11-30 Thread Claus Ibsen
Hi No you can't propagate spring TX accross different threads. On Fri, Nov 30, 2012 at 12:01 PM, tolk jmchug...@hotmail.com wrote: I have a situation similar to the simplified example below. Basically, I'm trying to use camel on an internal service to send an async message to itself via the

Re: issue with jsonFormatting and timestamps

2012-11-30 Thread Claus Ibsen
Hi Yeah I think we may have a JIRA ticket to improve the json data format to allow to configure it. Frankly we should maybe let json default be jackson. And add ways to configure it, so you can set custom serializers etc. On Thu, Nov 29, 2012 at 11:12 PM, Marco Mistroni mmistr...@gmail.com

Re: issue with jsonFormatting and timestamps

2012-11-30 Thread Claus Ibsen
I logged a new ticket just in case we didnt have that ticket I think we have https://issues.apache.org/jira/browse/CAMEL-5836 On Fri, Nov 30, 2012 at 12:25 PM, Claus Ibsen claus.ib...@gmail.com wrote: Hi Yeah I think we may have a JIRA ticket to improve the json data format to allow to

Re: aggregator issue

2012-11-30 Thread Claus Ibsen
On Thu, Nov 29, 2012 at 12:09 PM, Jason Chaffee jchaf...@shopzilla.com wrote: I have a custom aggregator strategy but for some reason the oldExchange is always null. Any ideas? Here is my route. from(seda:Split) .routeId(Split) .aggregate(new MyAggregationStrategy())

Re: Spring Transaction Propagating?

2012-11-30 Thread tolk
I noticed Camel has some functionality relating to transactional behaviour. Is this just internal transactional behaviour then i.e. only over the camel communication itself? Thanks. -- View this message in context:

Re: Spring Transaction Propagating?

2012-11-30 Thread Claus Ibsen
On Fri, Nov 30, 2012 at 12:41 PM, tolk jmchug...@hotmail.com wrote: I noticed Camel has some functionality relating to transactional behaviour. Is this just internal transactional behaviour then i.e. only over the camel communication itself? No it integrates with Spring TX. And ensures the

Re: Spring Transaction Propagating?

2012-11-30 Thread tolk
Not sure I follow (I'm newish to Camel and Spring TX). So basically it can't be done, so I'll be better off setting up functionality so that I can start my transaction at the consumer method rather than the producer to avoid changing thread during the transaction? Cheers for the help. -- View

Re: Jackson custom configuration

2012-11-30 Thread Claus Ibsen
Hi I have logged a ticket about this https://issues.apache.org/jira/browse/CAMEL-5836 On Tue, Nov 27, 2012 at 10:30 AM, Martin Stiborský martin.stibor...@gmail.com wrote: Hello guys, how it's possible configure in general Jackson in Camel? For example, I need to use

Re: Speed up marshalling objects to XML by explicitly loading classes

2012-11-30 Thread Claus Ibsen
Hi No there is not. Maybe if you specify a JAXB data format, and with the contextPath, then JAXB may load these on startup. Not sure though. On Tue, Nov 27, 2012 at 12:07 PM, Ben V venckus.be...@gmail.com wrote: I have lots of xsd and create java classes from them (~1000 classes) using xjc

Re: JMX attribute - Number of failures handled

2012-11-30 Thread gilboy
Thanks If my route has an error handler with a retry attempt policy of 5 and a recoverable error is thrown in the route and on the 2nd attempt it is successful should the number of failures handled be incremented in this instance? Furthermore, if in the same route an error occurs and after the

Re: Jackson custom configuration

2012-11-30 Thread Martin Stiborský
Thanks, I'll keep my eye on it. I'll check source codes too, to get idea how it works. On Fri, Nov 30, 2012 at 1:21 PM, Claus Ibsen claus.ib...@gmail.com wrote: Hi I have logged a ticket about this https://issues.apache.org/jira/browse/CAMEL-5836 On Tue, Nov 27, 2012 at 10:30 AM, Martin

Failover with Camel CXF

2012-11-30 Thread mabahma
Hello, I have many routes with many components like Activemq and CXF. I'm using the failover protocol to loadbalance Activemq brokers and CXF webServices. *The sysntax : failover:(tcp://server1:61616,tcp://server2:61616)* is working and messages routed to one broker when the other is down.

[FTP2] Problems transversing directories when uploading files with SFTP (Camel 2.9.4)

2012-11-30 Thread Aida
Hi, I have been having trouble trying to upload files using a sftp endpoint. The way I'm working to upload a file is using a ProducerTemplate ( ProducerTemplate.send(endPointDefinition, data2write) where data2write is the Exchange with the data I want to upload ). This way works for me working

Re: [FTP2] Problems transversing directories when uploading files with SFTP (Camel 2.9.4)

2012-11-30 Thread Leandro Franchi
Ainda, Do you have the correct permissions on the server? Best Regards Leandro Franchi On Fri, Nov 30, 2012 at 11:50 AM, Aida ai.d...@gmail.com wrote: Hi, I have been having trouble trying to upload files using a sftp endpoint. The way I'm working to upload a file is using a

Re: Problems unmarshalling with Java serialization (ClassNotFoundException)

2012-11-30 Thread Henryk Konsek
reading this title, i think i may have a similar problem. Do you have any solution ?? :) :) Hi, You're referring to the post older than year and which have been removed from the Nabble archive. :) Please describe your problem so we could help you :) . -- Henryk Konsek

Re: Camel multicast configuration file

2012-11-30 Thread Henryk Konsek
Hi Bala, I am trying to configure camel multicasting in my project. The requirement is to hit multiple services in parallel and consume the response. As Claus suggested you forgot to aggregate the requests. And here's how can you aggregate responses from multiple services:

Re: Speed up marshalling objects to XML by explicitly loading classes

2012-11-30 Thread Henryk Konsek
Is there a way to speed up first request and explicitly load all generated classes when I deploy my bundle? If loading these 1000 classes by classloader is the issue, then you can use Reflections [1] and eager loaded Spring bean to load all these classed when bundle context starts up. bean

Dead letter queue when header not matched?

2012-11-30 Thread tolk
For the following: errorHandler(deadLetterChannel(mock:dead).maximumRedeliveries(1).redeliveryDelay(100)); from(seda:start) .choice() .when(header(type).isEqualTo(A)) .to(direct:end) .routeId(myRoute); How would I configure the route to send the message to the deadLetterChannel

Singleton Endpoint Question

2012-11-30 Thread gilboy
Hi If an endpoint is defined to be a singleton and you have 2 camel routes both referencing the same endpoint URI, will camel call endpoint.createConsumer() once or twice? Thanks Joe -- View this message in context: http://camel.465427.n5.nabble.com/Singleton-Endpoint-Question-tp5723464.html

Re: Dead letter queue when header not matched?

2012-11-30 Thread Scott England-Sullivan
You can have a mock route that is a consumer of the DLQ just as you would have a mock route for the happy path. Here is a short example: from(seda:start) .choice() .when(header(type).isEqualTo(A)); .to(direct:end) .otherwise() .to(direct:my.DLQ) .routeId(myRoute);

Re: Dead letter queue when header not matched?

2012-11-30 Thread tolk
Scott, Cheers that makes perfect sense, however I wanted to test was the actual errorHandler part from first post. I'll use the otherwise to handle incorrect headers but I want to maintain the errorHandler for unforeseen problems. I was wondering if there is a way to force a message to hit the

Re: camel standlaone application deployment in clustered enviornment

2012-11-30 Thread Charles Moulliard
As camelContexts are independents from each other, you can deploy your application in different JVM and on different servers, there will never be in conflict. Nevertheless take care if your endpoints consume the same resources (files, ...) as they will be in competition in this case. On Fri, Nov

Test Intercept with adviceWith and http

2012-11-30 Thread lleclerc
Hi, This time I tried using http instead of http4. No exception, but the intercept is not working, even with isUseAdviceWith() to return true. What is going on ? using camel 2.10.2, and http 4.2.2. Thank you in advance, import org.apache.camel.Exchange; import org.apache.camel.Processor;

Re: Splitter and combining messages / exchanges

2012-11-30 Thread Oliver Geisser
Hi Claus, thanks for your help. I've checked the Composed Message Processor EIP. Maybe I'm missing something but as far as I can see the EIP will not work for my use case. Let's recap my problem with the input file Hello A B C ... Because it's a very large file it will be splitted in

Re: Splitter and combining messages / exchanges

2012-11-30 Thread Jason Chaffee
I believe could write a custom aggregator. On the first call, you put the Hello into a header on the Exchange and return that Exchange. On the rest of the calls, you can read the header and aggregate it with the current body. On 11/30/12 2:33 PM, Oliver Geisser oliver.geis...@gmail.com wrote:

Re: Splitter and combining messages / exchanges

2012-11-30 Thread Oliver Geisser
Hi Jason, that was my first idea, too. But this does not work. Because I need the streaming mode (big file) I need to release every line from from the Aggregator immediately, e.g. the completion predicate will be true for all lines but the first. And when an aggregated Exchange is completed it

Re: Splitter and combining messages / exchanges

2012-11-30 Thread Jason Chaffee
What about using the stream component instead of a splitter? You could then route to a bean and keep the first line in ThreadLocal or something like that, and do the aggregation in the bean. You could not doing any asynchronous processing in this case do to using the ThreadLocal. This might not