apache-camel

Camel PAHO routes not receiving offline messages while connecting back

蹲街弑〆低调 提交于 2021-01-29 19:13:52
问题 I'm using apache camel xml based paho routes for the subscription, publication process. While online, everything works fine. But I'm not able to receive the offline message. I have set the following., Constant Client ID Clean Session is FALSE, Both subscribed & published with QoS 2 With the standalone Program, it's getting all the offline messages. With the camel route it's not happening. 回答1: Finally, I was able to solve this one manually. Camel PAHO Client is not populating the callback

How to mention dynamic directory path in Apache camel route

梦想的初衷 提交于 2021-01-29 11:01:01
问题 I am trying to take files from different directories. For example I have following directory Structure vendors/dir1/files/heelo.txt vendors/dir2/files/hello2.txt in this there are 3 dirs: 1.vendors 2.dir1 and dir2 3.files since 2. dir1 and dir2 is different, so I have to take it dynamically. I have written following code: <routes xmlns="http://camel.apache.org/schema/spring"> <route id="com.performancebikes.Inventory1" autoStartup="false"> <from uri="b2bmbFileSystem://com.a/vendors/${file

How to set Camel HTTP4 connection timeout options?

蹲街弑〆低调 提交于 2021-01-29 08:50:14
问题 The documentation at Camel HTTP4 is quite clear that you can set the following options for the HTTP4 component: connectionRequestTimeout , connectTimeout , and socketTimeout . However, these are listed as general component options, not query options in the documentation (and are ignored if set as query options -- they just get passed onto the HTTP endpoint when called). So I'm not sure how to set them. The HTTPComponent class does not seem to have any setter methods for these options. The

Apache Camel not acquiring message from SQS in timely manner

元气小坏坏 提交于 2021-01-29 04:54:55
问题 We have an implementation where messages are being placed on an AWS SQS queue and being consumed by Camel AWS. We are using concurrentConsumers = 1. We are logging the polling of the queue as done by org.apache.camel.component.aws.sqs.SqsConsumer . The test consists of sending a message to SQS (from a remote system) and then logging the time the message is on the queue. On the Camel end, we have trace logging on the SqsConsumer class, and we can see when the queue is polled, and when messages

add namespace and prefix to xml

一笑奈何 提交于 2021-01-29 03:29:46
问题 I am using camel to route messages to a Webservice. The Messages are like XML but without namespaces/prefixes. The problem now is that the Webservice expects the XML but with the appropriate namespaces for each element. So as an example: <a> <b>value_b</b> <c>value_c</c> </a> is what im getting in, but what needs to be sent out should look like this <a xmlns:n1="http://yadda-ns1.com" xmlns:n2="http://yadda-ns2.com"> <ns1:b>value_b</ns1:b> <ns2:c>value_c</ns2:c> </a> if it was the same

add namespace and prefix to xml

ε祈祈猫儿з 提交于 2021-01-29 03:18:47
问题 I am using camel to route messages to a Webservice. The Messages are like XML but without namespaces/prefixes. The problem now is that the Webservice expects the XML but with the appropriate namespaces for each element. So as an example: <a> <b>value_b</b> <c>value_c</c> </a> is what im getting in, but what needs to be sent out should look like this <a xmlns:n1="http://yadda-ns1.com" xmlns:n2="http://yadda-ns2.com"> <ns1:b>value_b</ns1:b> <ns2:c>value_c</ns2:c> </a> if it was the same

Camel condition on aggregate of messages

回眸只為那壹抹淺笑 提交于 2021-01-28 10:31:54
问题 I'm looking for a way to conditionally handle messages based on the aggregation of messages. I've looked into a lot of ways to do this, but it seems that Apache Camel doesn't support it. I'll explain the scenario and then the solutions I tried. Scenario: I'm trying to conditionally clean a directory. I poll from the directory every x days and fetch all the files (file://...). I route this into an aggregation, that aggregates the files into a single size (directorySize). I then check if this

Apache Camel SFTP File Upload is not working

扶醉桌前 提交于 2021-01-28 07:30:11
问题 Program is not throwing any exception but file is moved to .camel folder.It was not uploaded to the server location /tmp/uta/test1 .Also it says "Upload file ubuntu.png is complete.". Please help me to find what is wrong. Router:- @Component public class SampleCamelRouter extends RouteBuilder { @Override public void configure() throws Exception { from("file:C:/Users/Downloads/test") .to("sftp://user@102.108.99.100/tmp/uta/test1?password=password"). log("Upload file ${file:name} is complete.")

Camel-sftp disable host verification globally

北战南征 提交于 2021-01-28 05:05:15
问题 I use Camel DSL route definition: @Component public class UploadRoutesDefinition extends RouteBuilder { ... @Override public void configure() throws Exception { ``` from(String.format("sftp://%s@%s:%d/%s?password=%s&delete=true&readLock=changed&delay=%s" ... When I put file into sftp folder I see following logs: 20/03/2018 14:02:4420.03.18 14:02:44.193 [Camel (My_Service) thread #3 - seda://parsed_csv] INFO o.a.c.c.file.remote.SftpOperations - Known host file not configured, using user known

Camel json validator support for json draft 07

99封情书 提交于 2021-01-28 01:57:18
问题 We are using Apache Camel Java DSL and the json-validator component to validate json requests against a json schema. The current camel version is 2.22.0, according to the camel documentation this supports JSON schema v4, v6, v7 and v2019-09 using the NetworkNT JSON Schema library. However, when I try a JSON schema draft 07, I get an error when running tests "Caused by: com.networknt.schema.JsonSchemaException: Unknown Metaschema: http://json-schema.org/draft-07/schema#". When i revert back to