apache-camel

Generate multiple from() dynamically Apache Camel RouteBuilder

自闭症网瘾萝莉.ら 提交于 2020-12-13 05:41:50
问题 I was using camel-core 2.24.1 and was able to do the following: from( sources.toArray(new String[0]) ) where sources is a list of URIs that I get from a configuration settings. I am trying to update the code to use Camel 3 (camel-core 3.0.0-RC2) but the method mentioned above was removed and I can't find another way to accomplish the same. Basically I need something like: from( String uri : sources ) { // add the uri as from(uri) before continuing with the route } In case this would help

How can we combine readLockCheckInterval and maxMessagesPerPoll in camel file component configuration?

老子叫甜甜 提交于 2020-12-11 08:58:22
问题 We are facing problem that camel file component readLockCheckInterval allow single file to be processed at a time and for next file camel lock, it will wait for readLockCheckInterval time. We have 10000 or more files which we want to process in parallel. I want to use maxMessagesPerPoll attribute for accessing multiple file per poll but with readLockCheckInterval because camel release the file lock if the file is still being copied. It will be great help if there will be any other way to

How can we combine readLockCheckInterval and maxMessagesPerPoll in camel file component configuration?

北战南征 提交于 2020-12-11 08:56:38
问题 We are facing problem that camel file component readLockCheckInterval allow single file to be processed at a time and for next file camel lock, it will wait for readLockCheckInterval time. We have 10000 or more files which we want to process in parallel. I want to use maxMessagesPerPoll attribute for accessing multiple file per poll but with readLockCheckInterval because camel release the file lock if the file is still being copied. It will be great help if there will be any other way to

Asynchronous Camel Component - doStop() called immediately

孤街浪徒 提交于 2020-11-28 02:22:58
问题 I am trying to create a camel component which consumes an API from an external service. My Route is as follows from("myComponent:entity?from=&to=") .to("seda:one") from("seda:one") .aggregate(constant(true), new GroupedBodyAggregationStrategy()) .completionSize(5) .completionTimeout(5000) .process( new Processor1() ) to("seda:two") . . . from("seda:five") .to("myComponent2:entity") I implemented my component consumer as follows public class MyComponentConsumer extends DefaultConsumer { public

Asynchronous Camel Component - doStop() called immediately

陌路散爱 提交于 2020-11-28 02:20:11
问题 I am trying to create a camel component which consumes an API from an external service. My Route is as follows from("myComponent:entity?from=&to=") .to("seda:one") from("seda:one") .aggregate(constant(true), new GroupedBodyAggregationStrategy()) .completionSize(5) .completionTimeout(5000) .process( new Processor1() ) to("seda:two") . . . from("seda:five") .to("myComponent2:entity") I implemented my component consumer as follows public class MyComponentConsumer extends DefaultConsumer { public

Asynchronous Camel Component - doStop() called immediately

故事扮演 提交于 2020-11-28 02:18:41
问题 I am trying to create a camel component which consumes an API from an external service. My Route is as follows from("myComponent:entity?from=&to=") .to("seda:one") from("seda:one") .aggregate(constant(true), new GroupedBodyAggregationStrategy()) .completionSize(5) .completionTimeout(5000) .process( new Processor1() ) to("seda:two") . . . from("seda:five") .to("myComponent2:entity") I implemented my component consumer as follows public class MyComponentConsumer extends DefaultConsumer { public