Questions tagged [spring-camel]

Spring wrapper over Apache Camel

more details here

586 questions
4
votes
2 answers

Camel doCatch and onException priority

I have a route with doTry() - doCatch() pair for a specific route and onException() in general. onException(Exception.class) .handled(true) .log(LoggingLevel.ERROR, "An error occurred: ${exception.stacktrace}") …
Ermintar
  • 1,322
  • 3
  • 22
  • 39
4
votes
1 answer

Camel doesn't catch Exception

.from("seda:rest_upload") .process(new Processor() { @Override public void process(Exchange exchange) { if(true){ throw new…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
3
votes
1 answer

Spring Boot and Camel- Log Route Duration

I am migrating an application to use the latest version of Spring Boot. Currently all the camel routes are in XML and I have it running using this approach. All the routes currently log a message at the end of processing. I was wondering is there a…
Damien
  • 4,081
  • 12
  • 75
  • 126
3
votes
2 answers

How to stop camel dynamic route on exception

How do I stop a camel route when there is an exception. My dynamic route is consuming jms and sending to reactive endpoint. camelContext.addRoutes(New GenerateRoute()); Route generator class is as below: public class GenerateRoute extends…
user3549576
  • 99
  • 1
  • 4
  • 17
3
votes
1 answer

Failed to start route [A] because of Multiple consumers for the same endpoint is not allowed: [E]

Getting this error when loading rest definitions via "xml-rests" to Camel Spring Boot 3.2 with the XML path defined in the property camel.springboot.xml-rests = classpath:folder-camel/folder-rest/*.xml My rest definition file looks as…
mindiga
  • 509
  • 3
  • 18
3
votes
4 answers

Apache Camel Spring Boot - Graceful shutdown of the application after processing the routes

I have couple of routes (route 1 and route 2) in my Spring Boot application. I have been researching how to gracefully shutdown the application after processing both the routes. I have referred the documentation…
user1637487
  • 241
  • 1
  • 9
  • 17
3
votes
2 answers

How to transform JSON file with key values to apache camel headers - Spring DSL

I have a JSON File with key value pairs and I want to put the key value pairs into headers. So when I have a file with content like this: [{"msgId": "8600C5A3-C666-4E63-BFDB-52BCF557F938", "jiraId": "ERR002"}] I want to create headers with the name…
DevelopperX
  • 85
  • 1
  • 2
  • 9
3
votes
2 answers

Apache-camel: How to process a json object (sent by curl) into headers?

I have a springboot application with apache camel. In it I have a camel-context. I am trying to send json through curl with a key pair value and processing it through a route. Sending the data: curl --header "Content-Type: application/json" -X POST…
DevelopperX
  • 85
  • 1
  • 2
  • 9
3
votes
1 answer

Lazy loading of beans referenced in apache camel route

There is a bean declared in a Spring boot configuration class with lazy annotation, which is referenced in camel route. The lazy annotation stops the eager loading, but since it is reference in camel route its gets initialized. Example ::…
3
votes
1 answer

How to write a custom Apache Camel component/endpoint with Spring Boot Java Config

I'm looking for an example/documentation of how to implement a custom Apache Camel component and endpoint with Spring Boot in Java Config. I don't know how I have to annotate the classes, that Could you please provide an example. Without using…
Joe
  • 287
  • 3
  • 13
3
votes
1 answer

Spring Boot Rest Controller vs Camel rest dsl

I'm developing a new application which is Spring Boot with camel. I am exposing REST endpoints as part of this application. I'm little confused to choose between these two options: Spring Rest Controller --> Spring service with producer template…
3
votes
2 answers

Propagate request param value in Camel SpringBoot project

Hello I have Spring Boot 2 project and I am using a camel for routes. I have a camel rest endpoint and a Camel route: …
xmlParser
  • 1,903
  • 4
  • 19
  • 48
3
votes
1 answer

How to trigger camel route from client request?

I have this route: from("timer://test?repeatCount=1").routeId("newRoute") .streamCaching() .process(exchange -> exchange.getIn() .setBody(exchange.getIn() .getBody())) .marshal() .json(JsonLibrary.Jackson) …
Bambus
  • 1,493
  • 1
  • 15
  • 32
3
votes
1 answer

How to change a property value inside a Apache Camel Route?

In a property file a variable test has been defined: test=OLD_VALUE In the following Spring-DSL definition a camel route is defined. Properties are loaded via PropertiesComponent.
E.Ambrosi
  • 31
  • 1
  • 4
3
votes
1 answer

Apache camel rest dsl RestBindingMode.json is not working

I am trying to build rest api using camel-rest-dsl. I have tried with multiple provider, spark-rest, jetty. But it throwing marshelling exception when i use RestBindingMode.json, if i remove rest binding mode it works…
vashishth
  • 2,751
  • 4
  • 38
  • 68
1
2
3
39 40