apache-camel

How to do a Salesforce query using apache camel related to the field CreatedDate?

喜你入骨 提交于 2021-02-11 12:50:51
问题 I am doing a salesforce query to fetch certain records based on conditions imposed on the field ID and CreatedDate using apache camel. This is the toD statement .toD("salesforce:query?sObjectQuery=Select Id, Name, CreatedDate from Account where Id > '' and CreatedDate > 2019-01-03T12:12:27.000+0000 order by CreatedDate, Id limit 10&rawPayload=true") This returns this error response org.apache.camel.component.salesforce.api.SalesforceException: {errors:[{"errorCode":"MALFORMED_QUERY","message"

What is the most optimal way to make an API on apache camel to have (SSL) implemented for HTTPS?

帅比萌擦擦* 提交于 2021-02-11 12:36:42
问题 I am looking to make my API created with Apache-Camel be HTTPS enabled. I have conducted some reading into the various ways (using Jetty, Netty etc.) but I'm wanting to know what the simplest and most efficient way to implement SSL to my camel based API is. Here is my current configuration, I would prefer (for simplicity's sake if I could use netty4-http) public void configure() { restConfiguration() .component("netty4-http")//Specifies the Camel component to use as the REST transport .host(

Bind aws sqs region camel

随声附和 提交于 2021-02-10 23:20:52
问题 So I'm trying to access to the simple queue service with apache camel. Java DSL approach works fine, but I try to work with xml configuration. private AmazonSQS sqs; sqs = new AmazonSQSClient(credentials); Region sqsRegion = Region.getRegion(Regions.US_WEST_2); sqs.setRegion(sqsRegion); The code above works fine, but i decided to build bean. <context:property-placeholder location="classpath:/default.properties" /> <bean name="sqsClient" class="com.amazonaws.services.sqs.AmazonSQSClient">

Inject a splitter that never aggregates

坚强是说给别人听的谎言 提交于 2021-02-10 14:11:40
问题 Camel ver 2.17.3: I want to insert a splitter into a route so that split messages remain split. If I have a "direct" route with a splitter, when control returns from the inner route, I no longer have split messages, only the original. from("direct:in") .transform(constant("A,B,C")) .inOut("direct:inner") .log("RET-VAL: ${in.body}"); from("direct:inner") .split() .tokenize(",") .log("AFTER-SPLIT ${in.body}") ; Based on the answer to a similar question, and Claus's comment below, I tried

Allow Camel context to run forever

一笑奈何 提交于 2021-02-10 07:17:27
问题 I am using camel-spring jar for springCamelContext. When I start the camel context , it run for 5 minutes (Default time). I can make my thread sleep for some specific time i.e. try { camelContext.start(); Thread.sleep(50 * 60 * 1000); camelContext.stop(); } catch (Exception e) { e.printStackTrace(); } BUT I want is my camelContext to run FOREVER because this application is going to be deployed and It will be listening for messages from KAFKA server. I know there is a class org.apache.camel

How to commit offsets thread safe using camel-kafka?

情到浓时终转凉″ 提交于 2021-02-08 10:51:12
问题 As asked in question How to manually control the offset commit with camel-kafka? I want to commit offsets manually using camel-kafka. My route: .from(kafka:topic1) .aggregate(new GroupByExchangeStrategy()) .to(kafka:topic2) .process(new ManualCommitProcessor()) , where ManualCommitProcessor will do the commitment after sending the message to another topic. Problem is that aggregator and kafka producer are working in separated threads to the kafka consumer which is responsible for offset

How to commit offsets thread safe using camel-kafka?

只谈情不闲聊 提交于 2021-02-08 10:48:38
问题 As asked in question How to manually control the offset commit with camel-kafka? I want to commit offsets manually using camel-kafka. My route: .from(kafka:topic1) .aggregate(new GroupByExchangeStrategy()) .to(kafka:topic2) .process(new ManualCommitProcessor()) , where ManualCommitProcessor will do the commitment after sending the message to another topic. Problem is that aggregator and kafka producer are working in separated threads to the kafka consumer which is responsible for offset

How to commit offsets thread safe using camel-kafka?

♀尐吖头ヾ 提交于 2021-02-08 10:48:25
问题 As asked in question How to manually control the offset commit with camel-kafka? I want to commit offsets manually using camel-kafka. My route: .from(kafka:topic1) .aggregate(new GroupByExchangeStrategy()) .to(kafka:topic2) .process(new ManualCommitProcessor()) , where ManualCommitProcessor will do the commitment after sending the message to another topic. Problem is that aggregator and kafka producer are working in separated threads to the kafka consumer which is responsible for offset

CamelJettyWebSocketServer, fatal error: 42: null cert chain

让人想犯罪 __ 提交于 2021-02-08 07:35:24
问题 I try to set up a mutually authenticated connection in a custom camel endpoint. I try to run a test. When I set ClientAuthentication.REQUIRE to NONE , a TLS connection is established and all is fine. I would like to have mutual authentication on connections, though. When i set the flag to REQUIRE , I get (with enabled full debug output): CamelJettyWebSocketServer-40, fatal error: 42: null cert chain javax.net.ssl.SSLHandshakeException: null cert chain What puzzles me: When i do not activate

JSON to JSON transformation (preferably inside Apache Camel)

て烟熏妆下的殇ゞ 提交于 2021-02-08 03:01:21
问题 I have somewhat unique requirement, which I could not find an answer to so far. I need a JSON to JSON transformation. Preferably, if I could plug it into Apache Camel, that would be wonderful. As a side note, I would also welcome any suggestion to optimally store the JSON to JSON mapping. Is there any XSLT-based way of achieving this? Thanks! Mario 回答1: ZORBA with jsonIQ : http://www.jsoniq.org/ it's a native library, but with high performance. You have examples in the web page. 回答2: There is