apache-camel

Apache Camel: multicast with aggregation - AggregationStrategy called too often

最后都变了- 提交于 2019-12-22 11:12:49
问题 I have the following strange (or at least unclear to me) behaviour for a multi-cast + aggregation. Consider the following route: from("direct:multicaster") .multicast() .to("direct:A", "direct:B") .aggregationStrategy(new AggregationStrategy() { @Override public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { if (oldExchange == null) { List firstResult = newExchange.getIn().getBody(List.class); newExchange.getIn().setBody(ImmutableList.copyOf(firstResult)); return newExchange

apache camel cxf https not working

五迷三道 提交于 2019-12-22 09:29:13
问题 I am trying to publish a webservice using apache camel cxf. I am able to access the published webservice using http. However I am trying to configure the same using https. But I am not able to get it to work. below are parts of spring context and wsdl files <camel-cxf:cxfEndpoint id="myEndoint" address="http://localhost:9000/PostXml/" serviceClass="com.XXXXXXXXXX.techquest.ServicesPortType" xmlns:ssp="http://techquest.interswitchng.com/" endpointName="ssp:PostXml" serviceName="ssp:PostXml" />

Apache Camel POJO Bean Processor Singleton or Prototype?

只谈情不闲聊 提交于 2019-12-22 09:20:01
问题 I'm using Camel's spring DSL to build routes and I'm using my POJO bean as a processor. Initially, I as doing: <bean ref="myPojoBeanProcessor"/> where, 'myPojoBeanProcessor' was defined as a bean in my spring context. Then, I switched to: <bean beanType="com.mycompany.transformation.MyPojoBeanProcessor"/> The Java DSL equivalent would be, I think: from("xxx").bean(MyPojoBeanProcessor.class).xxx I'm wondering if with the later approach, a bean object would be instantiated with every request or

camel: how can i send to an endpoint asynchronously

你。 提交于 2019-12-22 08:36:42
问题 How can I send a message to an endpoint without waiting for that endpoint's route to be process (that is, my route should just dispatch the message and finish)? 回答1: Using wireTap or multicast is what you're after. A direct: endpoint will modify the Exchange for the next step no matter what ExchangePattern is specified. You can see by using this failing test: public class StackOverflowTest extends CamelTestSupport { private static final String DIRECT_INPUT = "direct:input"; private static

camel: how can i send to an endpoint asynchronously

心已入冬 提交于 2019-12-22 08:36:00
问题 How can I send a message to an endpoint without waiting for that endpoint's route to be process (that is, my route should just dispatch the message and finish)? 回答1: Using wireTap or multicast is what you're after. A direct: endpoint will modify the Exchange for the next step no matter what ExchangePattern is specified. You can see by using this failing test: public class StackOverflowTest extends CamelTestSupport { private static final String DIRECT_INPUT = "direct:input"; private static

How to get access token from Authorisation Server using Apache Camel routes?

扶醉桌前 提交于 2019-12-22 08:13:01
问题 I have an authorization server [Simple Class annotated with @SpringBootApplication , @RestController , @Configuration , @EnableAuthorizationServer & oauth2 security] running on port 8081 which works fine & provides the access token when requested from POSTMAN using POST method along with needful parameters in the form of key value pair, http://localhost:8080/oauth/token , but how should i implement the camel route in java to get the access token by passing parameters in body ? 回答1: This

Replacement of Deprecated beanRef() in Camel v2.16.0

佐手、 提交于 2019-12-22 05:34:19
问题 We are upgrading from Camel v2.13 to v2.16 and discovered that beanRef() has been marked as deprecated. What is the replacement/alternative recommended by Apache Camel. I was unable to find anything useful on Camel v2.16.0 Documentation site. Even updated examples are not yet available. beanRef() is syntax within Java DSL Bean Language of Camel. 回答1: I assume that you are talking about the ProcessorDefinition class. The javadoc comments say to use the bean(...) methods as replacements for the

Camel: “file” component, but only pass file name as body

半城伤御伤魂 提交于 2019-12-22 04:48:20
问题 I'm trying to process potentially large files using Camel, and am worried about them "fitting" in the body of a Camel Message . Is there a way I can just pass the name (path) of the file as the body of the message, and then in a processor use that to read from disk? 回答1: You can just pass in a java.io.File instance. This is essentially what the Camel file component does itself (although its placed inside a WrappedFile, due sharing code with the ftp components). You can of course also just

What is the difference between Apache Camel and JBoss Fuse?

扶醉桌前 提交于 2019-12-22 03:50:59
问题 What is the difference between JBoss Fuse and Apache camel? How can it be used in building micro service based applications? 回答1: Apache Camel is a versatile open-source integration framework based on known Enterprise Integration Patterns. Camel empowers you to define routing and mediation rules in a variety of domain-specific languages, including a Java-based Fluent API, Spring or Blueprint XML Configuration files, and a Scala DSL. So From this definition you can conclude that Apache Camel

How to filter files by extensions using include parameter in Camel component File2

感情迁移 提交于 2019-12-22 03:36:44
问题 I need the simplest filter by extension: f.e. file 20120523.173227.CustomerMaster05092012.QWERTY.xml route: <from uri="file://{{fdr.folder.working.url}}&include=*.xml"/> doesn't work: Dangling meta character '*' near index 0 WARN - file://root_folder/working/) [FileConsumer] Consumer Consumer[file://root_folder/working/?delay=1000&delete=true&idempotent=false&include=*.xml&initialDelay=1000&readLock=changed] failed polling endpoint: Endpoint[file://root_folder/working/?delay=1000&delete=true