apache-camel

Apache Camel pollEnrich is not copying all the files

可紊 提交于 2019-12-04 06:00:28
问题 I've a camel route which looks like below from("activemq:queue:upload" ) .pollEnrich().simple("file:basePath/${header.ID}?noop=true&recursive=true") .aggregationStrategy(new ExampleAggregationStrategy()) .timeout(2000) .toD("ftp:${header.destinationURI}") In my file system file:basePath/${header.ID} contains multiple folders. When above route is executed, only 1st file from the 1st folder will be copied to ftp server. Remaining folders(with subfolders) aren't getting copied to ftp server! And

Apache Camel - transaction in routes

折月煮酒 提交于 2019-12-04 03:45:29
I have a general question about Apache Camel. I wasn't able to find whether the aggregator is transacted. If it is transacted, how the transactions are implemented and how fast the aggregation is? Sending the messages into the aggregator can run in a transaction. You would need a persistent store with the aggregator to let the outgoing messages act as a transaction. See the documentation about persistence http://camel.apache.org/aggregator2 For example there is a JDBC based and HawtDB (file based) persistent support out of the box. Its pluggable as you can also build your custom. Camel in

In an Apache Camel application, how can unit tests inject mock endpoints in place of real ones?

纵然是瞬间 提交于 2019-12-04 03:24:33
I am implementing a message translator pattern with Apache Camel, to consume messages from a RESTful endpoint and send them onward to an AMQP endpoint. The enclosing application is based on Spring Boot, and so I'm using Camel's " spring-boot " component to integrate the two frameworks. As suggested by the documentation in this spring-boot link, I'm implementing my Camel route inside of a @Configuration -annotated class which extends RouteBuilder : @Component public class MyRestToAmqpRouter extends RouteBuilder { @Override public void configure() throws Exception { from("jetty:http://my-restful

Difference Between Apache Kafka and Camel (Broker vs Integration)

末鹿安然 提交于 2019-12-04 03:09:27
问题 I am trying to understand the differences between something like Kafka and something like Camel. To my understanding Camel would provide much more abstraction for developers without having to worry about changing protocols/systems to some extent. How would Kafka not be able to handle most of what Camel can do now? I am reading through the documentation and it seems like Kafka has been updated/upgraded enough to slightly break away from being a message broker only. I guess my question would

REST service call with Camel which requires authentication api called first

允我心安 提交于 2019-12-04 02:55:19
Camel has to call REST service for some integration, However, the REST service has one authentication api (POST api) which needs to be called first to get a token and then other subsequent api calls has to be invoked with the token embedded in header of HTTP requests. Does Spring Restemplate or apache camel has some api to support the same? Followed @gusto2 approach, Its pretty much working fine. SO, I created two routes --> First one is a timer based like below, this generates the token, periodically refreshes it(since the route is timer based) and stores the token in a local variable for

Camel: Splitting a collection and writing to files

我怕爱的太早我们不能终老 提交于 2019-12-04 02:10:37
I´m trying to split an ArrayList and writing each element to it´s own file using Apache Camel like in this simplified example: from("timer://poll?period=10000").process(new Processor(){ public void process(Exchange exchange){ ArrayList<String> list = new ArrayList<String>(); list.add("one"); list.add("two"); list.add("three"); exchange.getIn().setBody(list, ArrayList.class); } }).split(body()).log(body().toString()).to("file:some/dir"); The log prints each item but only "three" is saved to a file. What am I doing wrong? Jan Claus Ibsen The file producer will by default "override" if a file

Unable to send file to rest webservice via apache camel http

≡放荡痞女 提交于 2019-12-04 01:56:19
问题 I am new to Camel and I am facing an issue while sending files to webservice via camel http. I have a rest web service which consumes Multipart form data type content and accepts input as part of form data. When I send file and form parameter via camel it gives me the following error at camel console: Stacktrace --------------------------------------------------------------------------------------------------------------------------------------- org.apache.camel.component.http

Does Akka obsolesce Camel?

牧云@^-^@ 提交于 2019-12-04 01:35:46
My understanding of Akka is that it provides a model whereby multiple, isolated threads can communicate with each other in a highly concurrent fashion. It uses the "actor model", where each thread is an "actor" with a specific job to do. You can orchestrate which messages get passed to which actors under what conditions. I've used Camel before, and to me, I feel like it's sort of lost its luster/utility now that Akka is so mature and well documented. As I understand it, Camel is about enterprise integration, that is, integrating multiple disparate systems together, usually in some kind of

Camel in OSGi Container: Apply InterceptStrategy to all camel contexts

隐身守侯 提交于 2019-12-03 22:18:48
I have several bundles (A, B, and C) deployed to an OSGi container, each containing a CamelContext and some routes. I have another bundle (M) with a CamelContext with a route (for collecting monitoring data) and a InterceptStrategy bean. I would like the InterceptStrategy bean from M to automatically apply to all of the other CamelContext s in the container (i.e., those in A, B, and C), without having to modify the other bundles. Ultimately, the goal is to wiretap data from each CamelContext into the route in M, without having to make any changes to A, B, or C to explicitly route the Exchange

Unable to deploy a osgi bundle containing a camel route defined via aries blueprint in Websphere 8.5

三世轮回 提交于 2019-12-03 22:09:21
I created an .eba file (enterprise bundle archive) that contains one osgi bundle having a apache camel route (Java DSL). The camel context definition is done via a blueprint xml file. When I tried to deploy the .eba file in Websphere Application Server 8.5, I got the following exception: org.apache.aries.application.modelling.ModellerException: CWSAL0126E: An exception occurred while modelling bundle ib-base_0.0.1.SNAPSHOT: org.apache.aries.application.modelling.ModellerException: org.osgi.service.blueprint.container.ComponentDefinitionException: Unsupported node namespace: http://camel.apache