Re: Wire Tap - dynamic endpoint URIs not working

2017-01-04 Thread Jakub Korab
Hi, Which version of Camel are you using? Dynamic resolution of wireTap endpoints was added in 2.16. Jakub On 04/01/17 09:25, jshankarc wrote: Let me know why header was not resolved in wiretap or help me with proper configuration from("timer://foo?repeatCount=1") .s

Re: Camel Aggregator issue

2017-01-04 Thread Jakub Korab
Hi Oliver, Assuming that the MFO ID can be placed into a header, you can do: .aggregate(header("mfo"), myAggregationStrategy) The first argument to the aggregate statement is a correlation expression, which effectively defines what messages need to be aggregated with each other. You can u

Re: Having issues with Multicast to Aggregation ...

2015-12-13 Thread Jakub Korab
Can you post up your code? It's hard to tell from the limited information that you have provided. Jakub On 11/12/15 13:43, jtoepfer wrote: I'm not sure if this is the same problem, but it only works once. The second time the process is kicked off the zip aggregation never finishes. The system

Re: AggregatinStrategy on split never stop

2015-12-13 Thread Jakub Korab
To handle exceptions within a split, your AggregationStrategy needs to be written in such a way that it deals with Exceptions. See the following for an example: https://github.com/CamelCookbook/camel-cookbook-examples/blob/master/camel-cookbook-routing/src/main/java/org/camelcookbook/routing/mu

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-13 Thread Jakub Korab
This bit is definitely a bug. Whether it's something in the component, or the SshClient library needs to be investigated. You should log this one in a Jira. On 12/11/15 16:42, codan84 wrote: Indeed the ClientSession of SshClient is being started, but never finished. Here are logs: 2015-11-12

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread Jakub Korab
If the threads are not being cleaned up, then it would seem that there is a leak in the SshClient library - this is confirmed by the screenshot of the threads that you attached on SO; they are all associated with SshClient. Can you verify that the client is in fact shutting down by set the logg

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread Jakub Korab
When you use the SSH producer endpoint in a to(..) statement, one instance of the endpoint is created within the route, its lifecycle is tied to the CamelContext and any resources used by it will be cleaned up at shutdown. The endpoint creates an instance of an SshClient (underlying library), a

Re: How to improve throughput by grouping messages in a Transaction (in JMS)

2015-11-12 Thread Jakub Korab
Hi Deepak, The SJMS Batch component is included in the same library, but it's a different Component implementation specifically for consuming batches of messages. It works using local JMS transactions only, and does not integrate with XA. Jakub On 12/11/15 11:59, deepak_a wrote: Thanks Cla

Re: Spring-Boot + Camel + producerTemplate ssh spawning thousands of threads

2015-11-12 Thread Jakub Korab
To work out if it's your use of the ProducerTemplate, try the following route instead and see whether the leak persists: from("timer://foo?period=1000") .transform().constant("/home/_username_/some_temp_script.sh") .to("ssh://_remote.machine.url.here_?username=_username_&keyPairProvider=#key

Re: com.sun.org.apache.xerces.internal.dom.TextImpl cannot be cast to java.lang.String

2015-07-24 Thread Jakub Korab
Try setting the return type from the xpath expression: .setHeader("isbns", xpath("/order//isbn/text()", List.class)) Jakub On 24/07/15 13:05, Markus Eisele wrote: Hi, I was trying to convert a bunch of //text() Nodes selected via XPath into a List and keep getting a ClassCastException. My in

Re: action at the end of the split

2015-07-24 Thread Jakub Korab
To add to what Claus said, a good way to go about this without getting lost in end()s is to do whatever you are doing inside the splitter within a sub-route, i.e.: from(...) .split(body().tokenize("\n")).streaming() .to("direct:processLine") .end() .log("after splitting") f

Re: Route with JMS down

2015-02-11 Thread Jakub Korab
Your exception seems to indicate that you haven't configured your ActiveMQConnectionFactory correctly. What the error shows is that you have connected it to: tcp://10.0.0.97:61616 What will happen in that configuration is that when the connection drops, the connection factory will remain in a

Re: How do I configure Apache Camel to sequentially execute processes based on a trigger file?

2015-02-11 Thread Jakub Korab
This sounds like a job for the dynamic router pattern, it's kind of like a smart loop that lets you decide what to do next based on the current state of the exchange. Depending on the last file to be loaded, you route to a subroute that consumes from the next file. https://camel.apache.org/dynamic

Re: How to handle requests sequentially for a given item

2015-01-20 Thread Jakub Korab
If you have access to ActiveMQ you could try putting the requests onto a JMS queue, and using Message Groups (http://activemq.apache.org/message-groups.html). Putting the item id in the JMSXGroupId header will ensure that only one JMS consumer processes the total set of messages for that item id se

Re: Modifying a shipped TypeConverter

2015-01-20 Thread Jakub Korab
I haven't tried this, so it's just conjecture, but you could try to remove the offending type converter from the TypeConverterRegistry and replace it with your own: |CamelContext context = ...| |TypeConverterRegistry converterRegistry = context.getTypeConverterRegistry(); ||converterRegistry.remov

Re: how to run a consumer route once?

2015-01-20 Thread Jakub Korab
Try using pollEnrich(...) to grab the file from S3. http://camel.apache.org/content-enricher.html Jakub On 20/01/15 15:03, aidatechinc wrote: > thank you. my example was using a file, I am aware of the polling stratregy > for a file component. The problem is I am trying to solve is grab once fi

Re: simple recipientlist expansion

2015-01-20 Thread Jakub Korab
One way to do this is to assemble the list of destinations in a header, then reference that. Here's a rough example: .process( new Processor() { public void process(Exchange exchange) { Message in = exchange.getIn(); List mediaList = ((YourPojo) in.getBody()).getMedia();

Re: Camel Hawtio route diagram

2015-01-19 Thread Jakub Korab
Hi, If you want to get the route to show you something else in the route id of the XML, you can set it manually. E.g. using the Java DSL: from("file://opt.../atg").routeId("file_consumer_atg")... Jakub On 18/01/15 04:31, aidatechinc wrote: > Hello, > > I am using camel 2.14.1 with akka 2.3.6.

Re: Camel distributed transactions/XA without full J2EE container?

2014-12-05 Thread Jakub Korab
have liked to stay Apache all the way down, but the lack of documentation was a problem. Having said that, I'm sure if you ask on the Geronimo mailing list about using their transaction manager out-of-container someone will help you out. Jakub Korab Author - Apache Camel Developer's Coo