Dataset Viewer
Auto-converted to Parquet Duplicate
Instruction
stringclasses
5 values
Input
stringlengths
35
30.4k
Output
stringlengths
31
28.4k
apache-camel
I am trying to connect to salesforce using Apache Camel salesforce component. Here is a very simple route I am trying to start: <code>@Override public void configure() throws Exception { from("salesforce:event/Case__e") .to("mock:end"); } </code> When trying to start it I am getting an obvious error say...
Your problem is related to the fact that <code>clientId</code> is a component option so it must be configured at the component level while you try to configure it like it was a query parameter / an endpoint option which cannot work. Depending on the runtime that you use, the way to configure a component may change but ...
apache-camel
I have a route to poll the email from the server. In the <code>FunctionRoute</code> I am trying to pass the subject of the email I want to fetch by the IMAP protocol using pollEnrich method in the <code>EmailPollingRoute</code>. Currently I am facing problem to make a dynamic URI endpoint. I noticed the headers are bei...
You can set pollEnrich URI dynamically using simple method, you can also specify timeout in similar way. <code>.pollEnrich() .simple("imaps://XXXXXXX.info" + "?username=XXXXX&" + "password=XXXXXXX&" +"folderName=Inbox/Test&" +"searchTerm.fromSentDate=now-72h&" +"searchTerm.su...
apache-camel
There's a DTO created on a builder method (assume it has only a "name" attribute with some random value) and I want to check if the returned object has the same value, but the response is null. Unit test code: <code>class GetProductByIdRouteBuilderTest extends CamelTestSupport { @Test void testRoute() throws Excep...
It sounds like a totally expected behavior since the body of the original message is <code>null</code> and your route doesn't transform it such that the result of your route is <code>null</code>. Let's describe your code step by step to better understand: The test method The next code snippet, sends a message to the ...
apache-camel
In my camel application, I am trying to send a message from the source AMQ Queue (INLET) doing some TRANSFORMATION(XMLTO JSON) to Target AMQ Queue (OUTLET) The message is successfully transferred from INLET to OUTLET. But the 1st Messages ID is different and the remaining all are the same in the entire route flow. Belo...
Before I used exchange.getIn().getMessageId() After using this exchange.getExchangeId() //Solved my issue
apache-camel
I am implementing simple camel application using camel 3.14.0. I start using modelcamelcontext. But there is below exception during setting custom tracer. <code>2022-04-29 17:04:18.474 INFO 10264 --- [ main] target.atom.engine.EngineApplication : Started EngineApplication in 14.158 seconds (JVM running f...
Assuming that you are using Camel Spring Boot, the <code>CamelContext</code> can be customized thanks to a bean of type <code>CamelContextConfiguration</code> that is meant to be used to add custom logic before and after Spring Boot and the <code>CamelContext</code> have been fully started. In your case, the idea is to...
apache-camel
I have a route builder that depending on the content of a message sets specific properties. It doesn't send it to other endpoints so I cannot mock them and check what they got. I can produce a message or exchange but is there a way to check it after it was transformed by this route builder?
Assuming that your route is synchronous (i.e. not <code>from:seda</code>), you can simply check that the property was updated on the exchange that you send via the <code>ProducerTemplate</code>. Let's assume that you need to check the value of the property <code>TestProp</code>: <code>package com.example.demo; import ...
apache-camel
I have something like the following: <code>.from("direct:start") .to("direct:a") .to("direct:b") .to("direct:c"); </code> The issue I have is <code>direct:a</code> modifies the body and then passes that modified body to b and c. I want a, b, and c to all get the same body. I was able to achieve this by do...
You can use enrich for this: <code>from("direct:start") .enrich("direct:a", AggregationStrategies.useOriginal(true)) .enrich("direct:b", AggregationStrategies.useOriginal(true)) .enrich("direct:c", AggregationStrategies.useOriginal(true)); </code> The <code>true</code> argument there means that exceptions t...
apache-camel
I have the following route definitions file (linehaul-routes.xml): <code><routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://camel.apache.org/schema/spring" xsi:schemaLocation=" http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/ca...
Camel Quarkus only supports 'simple' XML routes. You cannot define beans directly like you can with Camel Spring XML. Instead, you can declare a CDI bean and reference it in the XML. For example. <code>@Named("myErrorHandler") public DefaultErrorHandlerBuilder createDefaultErrorHandler() { return new DefaultErrorHa...
apache-camel
Java Code <code> @Component @RequiredArgsConstructor public class WireInboundFileListener extends RouteBuilder { private final JwtWireTokenService jwtWireTokenService; private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); @Value("${wire.ftp.protocol}") private String ftpProtocol; ...
The file is probably (sometimes) consumed by your Camel route before the file upload is finished. What you can try is to configure your endpoint to poll the files only if it has exclusive read-lock on the file (i.e. the file is not in-progress or being written); see the readLock parameter. I think the default is no rea...
apache-camel
I am using Apache Camel with IntelliJ Community Edition. I've seen on the official site some kind of debugger for XML DSL, but is not very clear how to use it... Does it works for the Community edition also? It asks to create a Camel SpringBoot Application run configuration, how I do it? In fact, when I check for this ...
Apache Camel plugin is not compatible with IntelliJ IDEA 2022.1. Try using 2021.3 instead.
apache-camel
<code>[ { "Name": "ABC", "ID": 1, "StartDate": 1444845395112, "EndDate": null, "ValueAction": null, "ValueSource": "lmn" }, { "Name": "PQR", "ID": 2, "StartDate": 1444845395119, "EndDate": 1446845395119, "ValueAction": null, "ValueSource": null }, { "Nam...
<code>import groovy.json.* def json = new JsonSlurper().parseText '''[ { "Name": "ABC", "ID": 1, "StartDate": 1444845395112, "EndDate": null, "ValueAction": null, "ValueSource": "lmn" }, { "Name": "PQR", "ID": 2, "StartDate": 1444845395119, "EndDate": 1446845395119, "V...
apache-camel
I am playing around with camel-k to build some integrations. The dev mode experience is really great. My command is <code>kamel run --config file:demo-template.json demo-driver.groovy --dev</code> But when i am finished i would like not just remove the <code>--dev</code> switch. I would like to have some yaml files to ...
You can use <code>kamel run ... -o yaml</code>, for example: <code>kamel run --config file:demo-template.json demo-driver.groovy -o yaml > integration.yaml </code> Despite the <code>run</code> name, when specifying the output, it will not actually run the integration
apache-camel
I've got a problem, i need to send get request to the url. But i got exception: <code>Failed to create route route1: Route(route1)[From[jetty://https://jsonplaceholder.typicode.... because of No endpoint could be found for: jetty://https://jsonplaceholder.typicode.com/todos/, please check your classpath contains the ne...
As the error message states, your problem is due to the fact that <code>camel-jetty</code> is not in your classpath. Assuming that you use Maven, simply add the following dependency to the pom of your project: <code><dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-jetty</artifactId> <versi...
apache-camel
I have an Apache Camel application with an Idempotent Consumer. I need a metric with the total number of duplicated messages. How could I implement such a metric? Code <code>@SpringBootApplication public class TestApplication { public static void main(String[] args) { SpringApplication.run(TestApplication.class,...
I found a workaround, see Idempotent Consumer: How to handle duplicate messages in the route Available as of Camel 2.8 You can now set the <code>skipDuplicate</code> option to <code>false</code> which instructs the idempotent consumer to route duplicate messages as well. However the duplicate message has been marked ...
apache-camel
How do you install Apache-Camel? I've just started reading 'Camel in Action' 2nd ed. In section 1.2.1, is suggests downloading the binary distribution. I found this link to from the releases page: Release 2.24.1 But I can only see a source-code download. I've tried to compile from the source, but that always encounters...
Camel, Java-projects and build-tools Apache Camel works like any other Java library or framework, meaning that in order to use the framework you'll have to include its java binaries (i.e .jar files) to your project as dependencies. Now to make things simpler most developers use either Maven or Gradle to create, manage ...
apache-camel
Facing an issue while migrating from 2.x version to 3.16.0. What is the alternative for <code><handled><constant>true</constant></handled></code> in camel-spring 3.x versions. What is the alternative for handled and continue in higher versions?
The <code>handled</code> tag is not deprecated as you can see in the class <code>OnExceptionDefinition</code> corresponding to the model class that is used to generate the XSD schema of the Spring XML DSL and in the latest XSD schema. The equivalent of your code in Spring XML DSL is: <code><onException> <!-- the ex...
apache-camel
I am trying to POC accessing DynamoDB via an Apache Camel application. Obviously Dynamo DB will run in AWS but for development purposes we have it running locally as a docker container. It was very easy to create a Dynamo BD table locally and put some items in there manually. I used for this my intelij Dynamo DB consol...
Assuming that you use Spring Boot as Camel runtime, the simplest way in your case is to configure the <code>DynamoDbClient</code> used by Camel thanks to options set in the <code>application.properties</code> as next: <code># The value of the access key used by the component aws2-ddb camel.component.aws2-ddb.accessKey=...
apache-camel
I saw in another post how manually adding the camel context and starting it should work, but it hasn't for me. I double checked the from, and to paths and they seem to be correct. Not sure why it's not calling the method and would appreciate some advice <code>public class CsvRouteBuilder extends DdsRouteBuilder { pri...
The processor is not called simply because your route is not properly declared such that Spring Boot is not aware of it. The proper way is to make your class extend RouteBuilder to define your route(s) and annotate your class with <code>@Component</code> to mark it as candidate for auto-detection when using annotation-...
apache-camel
I'm currently trying to add properties component with location set to my properties file to use properties placeholders in my project: <code>PropertiesComponent pc = new PropertiesComponent(); pc.setLocation("classpath:properties.properties"); context.addComponent("properties", pc); </code> But addComponent() function ...
The <code>PropertiesComponent</code> is a very special component thus there are dedicated methods like <code>setPropertiesComponent</code> and <code>getPropertiesComponent()</code> in the Camel context to manage it that you should use instead. Your code should rather be something like the following code: <code>// creat...
apache-camel
I have a spring web-app which uses camel-servletlistener(2.25.4), camel-urlrewrite(2.25.4) and springframework.web(5.3.15) internally. these dependencies uses javax.servlet internally because of which my web-app is not running in tomcat-10. can i know what should be done so that my web-app supports tomcat-10 too. I hav...
Apache Camel doesn't support Jakarta EE yet thus it cannot work for now on Tomcat 10. There is an ongoing task about that https://issues.apache.org/jira/browse/CAMEL-17136, you can follow it to know when it will be supported. Your second option is to use Tomcat 9 instead.
apache-camel
I have the following supercalss <code>BaseRouteBuilder</code> where I am handling the common exception. All my routes extends this class <code>1234Route extends BaseRouteBuilder</code>. In all my route I am calling at the end a http request to create the order and I am using a format to convert it to JSON. Is it possib...
RouteBuilder supports inheritance just like any other class, since onException is RouteBuilder scoped it's fine to define it in a base class. I would however advice against or at least be very careful when defining routes in something like BaseRouteBuilder. You should also mark BaseRouteBuilder abstract and I would als...
apache-camel
I'm using camel k on a project and I've tried use yaks framework for testing integrations routes. When I execute the command to begin the test which is written in a .feature file the .groovy file is not found. Does anyone have a clue about it? helloworld.feature <code>Feature: Hello Scenario: Print hello message ...
There are a couple of problems in the way you call it. The integration name is generally kebab case for Camel K integration, so, your feature must be: <code>Feature: Hello Scenario: Print hello message Given load Camel K integration myIntegration.groovy Given Camel K integration my-integration is running Th...
apache-camel
We need to ugrade hazelcast4 to Hazelcast5 and we are using Camel connectors.Does Apache Camel connector supports the Hazelcast5.any answer or reply or link will be helpful
It has been updated from 3.16.0 ahead. 3.16.0 has been released last week: https://github.com/apache/camel/commit/ab07cb5583874ca5fffbcf93d1929522359f77a5
apache-camel
I want start camel route when 4 files with specific names are in directory. When file1.csv.sem, file2.csv.sem, file3.csv.sem, file4.csv.sem start camel route. <code> <from uri="file:{{directory.path}}?include=file1.*.sem"/> </code> I expect camel route will start when these 4 files are in directory.
You could create timer or scheduled route that uses custom processor that checks contents of a folder using <code>File.list()</code> or <code>File.listFiles()</code>. If all the required files exist processor sets body, header or property to signal that the route should continue. After that you can use PollEnrich to co...
apache-camel
I'm trying to simply unmarshal an XML file as below: <code><?xml version="1.0" encoding = "UTF-8" ?> <feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <products> <product> <facet type="string" elementType="string" name="Weight (g)"><![CDATA[210]]></facet> </product> </prod...
From the nice suggestiongs of Nicolas Filotto, I fixed my mappings by first converting my XML to XSD then generated the POJO's using xjc. For Camel unmarshal process, I changed it from jacksonXML to use Jaxb converter. <code>@Component public class XMLSplitterRoute extends RouteBuilder { @Override public void ...
apache-camel
I'm facing an error to connect from my spring boot app container to Rabbitmq. I have attached the two docker containers (Rabbitmq and spring boot app) with bridge network in my docker compose file: <code> version: '3.3' services: rabbitmq: image: rabbitmq:3.8-management-alpine container_name: rabbitmq ...
At the end of the journey, I have found the solution, and yes after modifying the spring properties to these below new properties: <code>camel.component.rabbitmq.hostname=localhost camel.component.rabbitmq.port=5672 camel.component.rabbitmq.username=adminsi camel.component.rabbitmq.password=test </code> In this manner,...
apache-camel
I have the below route and bean to get the message from the property file. In some message I have to replace the arguments in the message. Therefore I have looked for a solution without writing 2 methods in the bean one with arguments (<code>getMessageWithArgs</code>) and the second without arguments (<code>getMessage<...
If your goal is to keep only one method, keep only the method where you have all arguments knowing that if the header <code>arguments</code> has not been set, its value will be <code>null</code>. <code>public String getMessage(@Header("functionId") String functionId, @Header("messageId") String messageId, ...
apache-camel
I'm currently struggling with exposing the REST api in my project using Apache Camel. When I run the project it seems to be fine in the console, but it just doesn't work: curl http://127.0.0.1:8080/materials curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused Here's the pom.xml file: <code><?xml ...
The component <code>camel-servlet</code> is not meant to be used in standalone mode as you are trying to do. It is meant to be used when you deploy your Camel application on a Servlet container or an Application Server. In standalone mode, if you want to expose a rest endpoint, you should rather use a component like <c...
apache-camel
Following the official documentation (https://camel.apache.org/manual/component-dsl.html#_using_component_dsl) I created this code: <code>package mygroupid.standalone; import org.apache.camel.CamelContext; import org.apache.camel.impl.DefaultCamelContext; public class MyMain { public static void main(String[] arg...
As stated into the documentation that you are referring to, you need to add the next dependency to your project: <code><dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-componentdsl</artifactId> <version>x.x.x</version> </dependency> </code> Where <code>x.x.x</code> is the same version as t...
apache-camel
The documentation in the "Getting Started" section says the following: "1. Create a CamelContext object." https://camel.apache.org/manual/book-getting-started.html#BookGettingStarted-CamelContext I tried it like this: <code>import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.a...
There are several ways to create a <code>CamelContext</code> depending on how you want to launch Camel (Standalone, Spring Boot, Quarkus, CDI...). Assuming that you want to launch Camel in standalone mode, you can create it using <code>DefaultCamelContext</code>. Like in the next basic example: <code>public final class...
apache-camel
I am trying to get a http response out of the JSLT Transformer within Apache Camel. Like in the given code sample <code>rest("/transform") .post("/start") .route() .to("jslt:transform.jslt").transform().body </code> I want to return the body after the transformation. But I always get an exception like <code>2022/03/23 ...
It depends on your actual use case but assuming that you post a json payload to your endpoint then what you want to achieve can be done as next assuming that you use <code>camel-undertow</code>: <code>// configure rest-dsl restConfiguration() // to use undertow component and run on port 8080 .component("underto...
apache-camel
I have parent router that calls other routers. The parent router has all the exception handling logic. In all child routers, on exception, I want to just add properties in the exchange object and leave the actual exception handling in the <code>parent(main)</code> router. Example: <code>public class ParentRouter extend...
What you try to achieve can be done using routes dedicated to error handling that call each other (child error handler route calls parent error handler route) or at least a route for the main error handler that is called by the exception policy of your child routes. Something like: <code>// The main logic of the main e...
apache-camel
I have many quartz to schedule tasks like (ping, Email, etc.). Is it possible to manage many quartzes in one route in Apache Camel or I have to create route for every quarz? Error: <code>Caused by: org.apache.camel.FailedToStartRouteException: Failed to start route route9 because of Multiple consumers for the same endp...
What you did there already is "create route for every quartz". I believe the only reason why you're getting this error is that you gave the same ID to both your quartz endpoints. Try naming them "myTimer" and "myTimer2" (or anything more meaningful like "emailTimer" and "pingTimer") and you should be fine.
apache-camel
My intention is to send a list of messages one by one (messages are generate using values from db). What I do is query and get the message list attach it to the exchange and use split to slipt the messages and it sends Below is my route <code>.process(this::analyseSettlement) .choice() .when() ....
One way to implement what you try to achieve in a Camel route is to use the EIPs <code>doTry</code>, <code>doCatch</code> and <code>doFinally</code> pretty much like the famous try-catch-finally blocks in Java associated with <code>stopOnException</code> to interrupt the execution of the split in case of error. In the ...
apache-camel
I have a problem with ElasticSearch. My application write on Elasticsearch index using Apache Camel routes. Sometimes it happens that my Elasticsearch is not reachable and therefore the data that should be written at that time is lost. Is there a way to make it safe to write to Elasticsearch in order to retrieve data t...
Look into using a redelivery policy. For longer term outages, or when redelivery attempts are exhausted, you'd want something like a dead letter queue so the data is not lost.
apache-camel
I'm trying to make unmarshalling a file in a camel route work. I'm using the SmooksDataFormat to do so. Currently I have these things configured: Route: <code>@Component public class MyRoute extends RouteBuilder { @Override public void configure() throws Exception { // @formatter:off Smooks...
I've figured out that this wrong version of the <code>scala-library</code> came from my dependency management dependency: <code><dependencyManagement> <dependencies> <dependency> <groupId>org.apache.camel.springboot</groupId> <artifactId>camel-spring-boot-dependencies</artifactId> ...
apache-camel
While monitoring an Apache Camel application with hawt.io, I noticed that the nodes of a camel route have some properties that I cannot influence with the Java DSL, but which are displayed in hawt.io. It would be pretty awesome if you could define them anyway. I am particularly interested in the id and the description ...
In Java DSL, you can set the id of a node thanks to the method <code>id(String id)</code>. In the next example, the id of the endpoint <code>mock:bar</code> has been set to <code>bar</code>: <code>from("direct:start") .to("mock:foo") .to("mock:bar").id("bar") .to("mock:result"); </code>
apache-camel
I'm currently working with Apache Camel and hawt.io for monitoring and debugging my Camel routes. This works wonderfully, even if some important information is somewhat hidden in the documentation. For example, it took me a bit to turn on debugging. However, if I set a breakpoint where the message processing stops at t...
I found the reason for my problem: I used Camel 3.15.0 which is currently not supported by the camel plugin of hawt.io. When using latest 3.14.x it works like a charm :-) Hopefully there is still a maintainer of the camel plugin who will improve it in the near future. I am willing to contribute but the hawt.io develope...
apache-camel
When I try to marshal data I got from the database in Apache Camel using JAXB and providing XSD schema I get the error java.io.org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: java.util.LinkedHashMap to the required type: java.io.InputStream with value {id=5, numbe...
Generating classes from XSD with CLI tool You can use xjc command-line tool that comes pre-installed with at JDK 8 to generate jaxb classes. Example: <code>xjc material.xsd # With groupId xjc -p <groupId> material.xsd # With groupId and bindings configuration file xjc -p <groupId> -b bindings.xjb material.xsd </code>...
apache-camel
I am reading a file from a directory, and trying to call an API based on the data in the file. While trying to handle the exceptions, I am facing an issue. I am trying to configure the onException block to redeliver 3 times, with a delay of 5 seconds. The issue occurs, when I am setting <code>handled(true)</code>. This...
Unless you use a buggy version of Camel, the redeliveries are made as expected whatever if it is handled or not. The only difference between handled or not, is the fact that the result sent back to the client once the retries are exhausted will be either the exception (not handled) or the result of your <code>onExcept...
apache-camel
I am new to using jolt Currently facing issues combining array of maps. I have an array of maps, 1 key in each map has an array of strings - as shown in input JSON. I am trying to combine all the key/values into single array of maps - as shown in expected output When combined the values are getting merged rather than b...
You're so close to reach the solution. Just seperate the values by <code>@(3,base)</code> while walking through the indexes of the <code>frontItem</code> list such as <code>[ { "operation": "shift", "spec": { "items": { "*": { "frontItem": { "*": { "@": "@(3,b...
apache-camel
Apache camel has added camel developer console in their latest release(3.15.0) I was trying it but after adding dependencies and 'camel.main.dev-console-enabled = true' , I am not able to find the developer console I had tried with endpoint http://localhost:8080/dev Also I am not able to enable dev console when I am us...
It is actually a very new feature, for now, the developer console is only available from http://localhost:8080/dev when you use Camel JBang as mentioned in the documentation. For other modes, you can enable it programmatically by calling <code>context.setDevConsole(true)</code> or in case of Camel Main by setting <code...
apache-camel
I'm currently working on an integration project. I have to get some data from the MySQL database and them combine them using Apache Camel. In the database I've got two tables, materials and packages. They are in the one-to-many relation, one material can contain multiple packages. I've already figured out how to get da...
Aggregators are normally used to combine messages coming in from a source. I probably wouldn't use the aggregators to combine these two sets of items. If you're looking to pull all the Materials and get the associated packages from the database, you might be better to retrieve the list of packages per Material. I would...
apache-camel
I created a xsd and used it with jaxb plugin like bellow: <code><?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.mycompany.fr/Canonical/Schema/invoices.xsd" targetNamespace="http://www.mycompany.fr/Canonical/Schema/invoices.xsd" ...
When unmarshalling, you do not need to refer to a schema, but to a JAXB <code>contextPath</code>. You have to tell JAXB where (=in which packages) to find annotated pojos so that it will be able to turn xml into corresponding java objects. So try this: <code>JaxbDataFormat jaxbDataFormat = new JaxbDataFormat(); jaxbDat...
apache-camel
I defined a processor with camel which allow me to generate a jaxb java bean with a timer and write the pojo in xml file. But when I launch the application I got the following error: 08:09:00 WARN [or.ap.ca.co.ti.TimerConsumer] (Camel (camel-1) thread #2 - timer://generateInvoice) Error processing exchange. Exchange[2...
Most probably List is not what you want to put into the Exchange. I assume you want output XML to be something like: <code><Invoices> <Invoice>...</Invoice> <Invoice>...</Invoice> ... </Invoices> </code> in which case it's probably most straightforward to declare a container class: <code>@XmlRootElement public class...
apache-camel
I am unable to read in batch with the kafka camel consumer, despite following an example posted here. Are there changes I need to make to my producer, or is the problem most likely with my consumer configuration? The application in question utilizes the kafka camel component to ingest messages from a rest endpoint, va...
At the lowest layer, the <code>KafkaConsumer#poll</code> method is going to return an <code>Iterator<ConsumerRecord></code>; there's no way around that. I don't have in-depth experience with Camel, but in order to get a "batch" of records, you'll need some intermediate collection to "queue" the data that you want to ev...
apache-camel
I have a custom class I'm trying to set to an incoming exchange message. But i keep getting this error when I try to set it. <code>java.lang.ClassCastException: java.lang.String cannot be cast to com.models.CsvModel </code> My route is below <code>private final DataFormat bindy = new BindyCsvDataFormat(com.models.CsvMo...
It doesn't look like you ever actually converted the exchange body to a CsvModel. To do that, you'll need to call .convertBodyTo() prior to your processor receiving the exchange. <code>.split(body().tokenize(",")) .convertBodyTo(CsvModel.class) .process(new CsvConverterProcessor()) </code> Camel also doesn't know how t...
apache-camel
SOLVED! Scroll down to Solution. I have entity Person with some basic data on table A and more specific data on tables B, C, D, etc (address, for example). PersonResponseDTO (summarized): <code>{ "id": 1, "name": "Test" } </code> AddressResponseDTO (summarized): <code>{ "person_id": 1, "street": "Test S...
You have to model a route which enriches the first web service result with the second one. The way you merge both responses has to be specified in your <code>AggregationStrategy</code> instance. See the enrich EIP: https://camel.apache.org/components/3.14.x/eips/enrich-eip.html
apache-camel
I hope you guys are doing well. We are evaluating some solutions (Apache Camel K and the likes) to allow teams to: Low Code protocol transformation (Kafka, FTP, S3, MQ, SOAP, SFTP, gRPC, GraphQL, etc.) One team in particular has to integrate their product with 100s of external partners (each one uses a different integ...
Cloud Workflow can perform basic transformation (on string or date), but I can't recommend that. It's better to have a Cloud Functions or a Cloud Run that perform a transformation with code. You will be able to write unit test on it and to ensure the quality and the evolution of your system without regressions. For orc...
apache-camel
I am trying to test a route which is like this: <code>from("s3://bucketName") .process(exchange -> {exchange.getIn().setHeader(Exchange.FILE_NAME,MY_FILE_NAME);}) .log("File download Successful") .to("file:" + FILE_PATH).routeId("mys3Route"); </code> I have written my test like this: <code>@Test public void testFileMov...
For starters you probably should not replace consumer/From endpoint with MockEndpoint just use direct endpoint. MockEndpoints only support producer endpoints (to) and should not be used as consumer endpoint (from). MockEndpoints are meant to be used as points on your route where you want to do assertions on things like...
apache-camel
I'd like to know if it is possible to write to MongoDB with Apache Camel and choose to write asynchronously. I've seen no reference for the MongoDB Java Reactive Streams Driver, but I'd like to know if there's also an option of writing to MongoDB with Apache Camel with the Reactive driver (for Project Reactor users).
The MongoDB producer Apache Camel component uses the Sync - MongoDB Java Driver by default. A component in Apache Camel runs as is and cannot be modified unless through a predefined set of configuration options. To achieve multi-threading, you can decouple the continuation of message routing from consuming thread using...
apache-camel
I would like to download a list of files with name and content in Apache Camel. Currently I am downloading the file content of all files as byte[] and storing them in a List. I then read the list using a ConsumerTemplate. This works well. This is my Route: <code> from(downloadUri) .aggregate(Aggregat...
I solved this by implementing a custom AggregationStrategy. It reads the file name and the file content from each Exchange and puts them into a list as a NameContentPair objects. The file content and file name is present in the Exchange's body as a RemoteFile and is read from there. The general aggregation implementati...
apache-camel
I have a camel route in <code>MyRouteBuilder.java</code> file which is consuming messages from ActiveMQ: <code>from("activemq:queue:myQueue" ) .process(consumeDroppedMessage) .log(">>> I am here"); </code> I wrote a test case for the following like this : <code>@Override public RouteBuilder createRouteBuilder() throws ...
Instead of setting up an explicit active mq broker , I started using a VM broker . <code>@Override protected RoutesBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { @Override public void configure() { ConnectionFactory connectionFactory = new...
apache-camel
I have a spring boot application that uses cxf camel routes, I didn't do any special configurations, entry point is http://0.0.0.0. My question is what is the maximum number of clients that my application is able to handle concurrently without any customizations? And what should I do and where if for example the defaul...
It s about your web server. if you are use quarkus + camel quarkus use vert.x in background. you must configure vert.x and this parameters are vertx.eventloops.poolsize and vert.worker thread size. if you are use quarkus+spring boot. spring boot uses tomcat in default . u can use undertow or jetty.its tomcat paramete...
apache-camel
I am trying to read an Excel file using Apache Camel. For that I have found that we can use the CSV component: <code>https://camel.apache.org/components/3.14.x/dataformats/csv-dataformat.html </code> For that I have created a simple route which reads a XLSX file from a folder. Then I am trying to print the content of o...
I suppose you try to read a real Excel file (<code>.xlsx</code>). That does not work with the CSV data format. The <code>CSVFormat.EXCEL</code> format is to read CSV files (<code>.csv</code>) exported from Excel. Because the CSV format is done quite different from product to product, Camel supports multiple "well-known...
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
3