Questions tagged [apache-camel]

Apache Camel is an open source integration framework that focuses on quick and easy integration of systems consuming or producing data.

Apache Camel is an open source integration framework that empowers you to quickly and easily integrate various systems consuming or producing data.

11646 questions
14
votes
2 answers

Camel - Passing specific parameters from routes to a generic bean method

Let's say I have a Camel route that looks like this : from("direct:myRoute") .setHeader("someHeader", simple("some header value")) .beanRef("myBean", "beanMethod"); And I have a bean that I cannot change that looks like this :…
abbasdgr8
  • 555
  • 1
  • 5
  • 15
14
votes
5 answers

No component found with scheme http error in apache camel

I have written sample code for calling rest api using apache camel. Which is working correctly in standalone but the same code I have used to create OSGI bundle and deploy it into the karaf container that the bundle is created sucessfully but i am…
Azhaguvel A
  • 631
  • 2
  • 10
  • 24
14
votes
1 answer

Caused by: java.net.SocketException: Unexpected end of file from server

I am getting the below error quite intermittently when i run the WS through SOAP UI. Sometimes it does not work and then it keeps working and then again sometimes it does not work. One other issue is the test web service works fine provided by…
Samar
  • 443
  • 1
  • 5
  • 17
14
votes
1 answer

Exception using Jackson JSON library with camel

I am having trouble using the Jackson JSON library with camel. The exception is: FailedToCreateRouteException: Failed to create route... because of Data format 'json-jackson' could not be created. Ensure the data format is valid and the associated…
KingAndrew
  • 1,164
  • 4
  • 21
  • 41
14
votes
5 answers

How can I log a header value in camel using spring DSL

This seems like it should be simple, pardon the pun. I'm trying to log a header in camel within a spring DSL route. I've seen the answer for Java DSL but I've been searching in vain for how to make it work in spring DSL. I've tried:
Steve Harrington
  • 942
  • 1
  • 7
  • 18
14
votes
1 answer

camel, JMS, CLIENT_ACKNOWLEDGE mode

I know that Camel's JMS component, for receiving messages, uses Springs DefaultMessageListenerContainer. It can be configured to use CLIENT_ACKNOWLEDGE mode for acknowledging messages. My question is, when exactly the message.acknowledge() method…
Michal Pasinski
  • 568
  • 7
  • 20
14
votes
5 answers

What's the difference between "direct:" and to() in Apache Camel?

The DirectComponent documentation gives the following example: from("activemq:queue:order.in") .to("bean:orderServer?method=validate") .to("direct:processOrder"); from("direct:processOrder") .to("bean:orderService?method=process") …
bacar
  • 9,761
  • 11
  • 55
  • 75
14
votes
3 answers

Add camel route at runtime in Java

How can I add a camel route at run-time in Java? I have found a Grails example but I have implement it in Java. My applicationContext.xml already has some predefined static routes and I want to add some dynamic routes to it at run time. Is it…
Himanshu Yadav
  • 13,315
  • 46
  • 162
  • 291
13
votes
1 answer
13
votes
1 answer

How in Camel to add and start routes dynamically?

I'm trying to remove some boilerplate from routes in Camel. For example, let's consider the two routes, which are similar and most of their inner stuff could be generated. I've created a component "template", which creates TemplateEndpoint, and…
diziaq
  • 6,881
  • 16
  • 54
  • 96
13
votes
5 answers

Is it possible to kick off a camel route using a java interface or bean?

I'd like to setup a spring bean (either via interface or bean class). that I can call to "start" a Route. In this simple example when I call sayHello("world") from code I'd like it to route the return value of the sayHello method the endpoint that…
ScArcher2
  • 85,501
  • 44
  • 121
  • 160
13
votes
2 answers

Work Flow in Camel vs BPM

We have used Apache camel as a Workflow engine.First Wehave WebService One and wait for the response and based on the response call WebService 2 or WebService 3.Its a pure WorkFlow and have couple of WorkFlow Steps like this.I have got less chances…
Leo Prince
  • 940
  • 2
  • 14
  • 33
13
votes
1 answer

camel Java DSL Choice in a Choice

I want to have _ from( A ) _ .split()... _ .choice() //Choice 1 _ .when( predicate ) _ .process() _ .choice() // Choice 2 _ .when( x ) _ .to( X ) _ .otherwise() _ .to( Y ) _ .end() // to terminate inner…
user1743310
13
votes
1 answer

How to split a file into lines in Camel but process the first line differently

I am splitting a file into lines using a tokenizer: .split().tokenize("\n", 1) However, some of the files I need to process will contain a header line, which will need to be processed differently to the normal lines. Is there an easy way to read…
Hedley
  • 1,060
  • 10
  • 24
13
votes
1 answer

Does camel create a thread for each route

Recently i have started using camel and i see that it potentially addresses a lot of my integration layer needs. I have created a java client application (not running in any container) where i defined two routes: route1: move a file from an incoming…
techuser soma
  • 4,766
  • 5
  • 23
  • 43