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.
11,772
questions
1629
votes
22
answers
678k
views
What exactly is Apache Camel?
I don't understand what exactly Camel does.
If you could give in 101 words an introduction to Camel:
What exactly is it?
How does it interact with an application written in Java?
Is it something ...
171
votes
11
answers
104k
views
When to use Spring Integration vs. Camel?
As a seasoned Spring user I was assuming that Spring Integration would make the most sense in a recent project requiring some (JMS) messaging capabilities (more details). After some days working with ...
83
votes
7
answers
49k
views
Apache Camel and other ESB products
Hey,
If we have Apache Camel why to use other solutions like Apache ServiceMix and Mule?
Is there something Apache Camel can't do comparing to these products?
When to use Mule/ServiceMix and when to ...
61
votes
1
answer
9k
views
How to route Rest request from a local service to a remote one using Camel
I am trying to route a rest request from a cxf rest service to another. I have had a look at http://camel.apache.org/cxfrs.html which helped understand part of the process. I have a classCastException ...
60
votes
7
answers
53k
views
Apache Camel : "direct:start" endpoint - what does it mean?
I'm new to Apache Camel. Can someone explain what "direct:start" means in Camel.
Please see
https://camel.apache.org/components/latest/http-component.html
from("direct:start")
.to(&...
59
votes
6
answers
32k
views
Java Messaging : Difference between ActiveMQ, Mule, ServiceMix and Camel
I am new to Messaging and want to know the difference between ActiveMQ, Mule, ServiceMix and Camel
Anyone knows how each of these product is different?
Thanks in advance !
EDIT: Also would like to ...
45
votes
2
answers
20k
views
Apache Camel: do Processors and Beans serve the same purpose?
It seems like both serve the same purpose. Is there any difference that makes one useful in certain situations and not the other ?
39
votes
3
answers
37k
views
Apache Camel producers and consumers
I have difficulties wrapping my head around the concept.
I am trying to implement an endpoint that listens on a tcp port for incoming messages in a proprietary format, which would then transform the ...
38
votes
5
answers
136k
views
how to convert JSONArray to List of Object using camel-jackson
Am having the String of json array as follow
{"Compemployes":[
{
"id":1001,
"name":"jhon"
},
{
"id":1002,
"name":"jhon"
}
]}
i ...
33
votes
4
answers
43k
views
Passing values between processors in apache camel
In apache camel, which of those is the best way to pass values from an exchange processor to another (and why) :
storing it in the exchange headers
using the setProperty method while building the ...
26
votes
12
answers
29k
views
How to configure Jackson ObjectMapper for Camel in Spring Boot
I am trying to serialize and deserialize POJOs to and from JSON on Camel routes using Jackson. Some of these have Java 8 LocalDate fields, and I want them to be serialised as YYYY-MM-DD string, not as ...
25
votes
1
answer
28k
views
Stacktrace from Camel Context onException
I'm trying to retrieve the stacktrace from the onException handler in Apache Camel:
<onException>
<exception>java.lang.Exception</exception>
<handled&...
23
votes
2
answers
25k
views
Camel end vs endChoice - not the usual query
First, yes, I have searched and, yes, I have read the same Apache document every one points to. :-) I think there is a bit of confusion and I think I know an answer, so let me lay out an example of ...
23
votes
4
answers
23k
views
How to unit test production routes in Apache Camel?
Let's say I have my routes created in separate RouteBuilder class. It looks like:
grab message from JMS queue
do some transformation, validation etc
depending on validation results forward to ...
22
votes
1
answer
6k
views
Camel - Exception handling in 'sub routes'
Camel explicitly handles two 'scopes' of error handling:
Global
per Route
The issue I'm having is exceptions thrown in a 'sub route'. For instance, I've got this route:
from("direct:...
22
votes
2
answers
23k
views
Apache Camel: errorHandler vs onException?
What's the difference between:
<camel:errorHandler id="deadLetterErrorHandler" type="DeadLetterChannel"
deadLetterUri="log:dead">
<camel:camelContext errorHandlerRef="...
22
votes
3
answers
898
views
Camel in OSGi Container: Apply InterceptStrategy to all camel contexts
I have several bundles (A, B, and C) deployed to an OSGi container, each containing a CamelContext and some routes. I have another bundle (M) with a CamelContext with a route (for collecting ...
21
votes
1
answer
24k
views
unit testing functions with Apache Camel Exchange as parameter
I am doing java camel development and I want to unit test(junit4) a bunch of functions with Exchange being passed in as parameter.
For example :
public finalObject getProperty(final Exchange ...
21
votes
2
answers
10k
views
Camel send to multiple end points
How does these two differ
from(endpoint).to(endpoint:a, endpoint:b)
from(endpoint).multicast().to(endpoint:a, endpoint:b)
couldn't find any documentation for the first
21
votes
5
answers
20k
views
Apache camel alternative in .net?
Apache Camel provided the sort of configurable architecture which allows web service messages to be determined dynamically during run time for web services that are hosted in Java environment.
I ...
21
votes
3
answers
15k
views
Spring Transaction Synchronization of JDBC and JMS
I have a spring web app running on jboss that is currently configured to use the HibernateTransactionManager for db transactions and the JmsTransactionManager for jms. For jms we use Camel and ...
20
votes
2
answers
23k
views
Apache Camel Spring configuration error - Unable to locate Spring NamespaceHandler for XML schema namespace [http://camel.apache.org/schema/spring]
I've posted an excerpt from my spring.xml file and the stack trace I'm getting.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:...
20
votes
2
answers
55k
views
Apache Camel: how store variable for later use
while 'playing around' with Camel using Spring DSL, I came across the following problem. Suppose the expected message flow looks like this:
client sends HTTP POST message with XML body to CAMEL
CAMEL ...
20
votes
5
answers
18k
views
How can Apache Camel be used to monitor file changes?
I would like to monitor all of the files in a given directory for changes, ie an updated timestamp. This use case seems natural for Camel using the file component, but I can't seem to find a way to ...
20
votes
2
answers
18k
views
Camel Routes and Endpoints
I've been poring over the Apache Camel docs trying to get a concrete understanding of two of its most basic concepts (endpoints and routes), and although these terms are used everywhere throughout the ...
20
votes
1
answer
21k
views
Testing Camel with MockEndpoints
I've got a series of "pipelined" components that all communicate through ActiveMQ message queues. Each component uses Camel to treat each of these queues as an Endpoint. Each component uses the same ...
19
votes
7
answers
35k
views
Apache Camel - Triggering a task on startup to run only once
I am working on a Java project using Camel & Spring. We would like to trigger an initialize method on a singleton bean after Spring finished doing its thing and Camel has finished building all ...
18
votes
2
answers
21k
views
How to define exception to be thrown through ref in Apache Camel
Have to throw an exception in my camel route defined in XML. Found throwException statement available from Camel 2.3 which looks like:
<throwException ref="forced"></throwException>
...
18
votes
5
answers
2k
views
Wrangling up XMPP
Wikipedia defines XMPP as:
...an open-standard communications protocol for message-oriented middleware based on XML.
xmpp.org defines XMPP as:
The Extensible Messaging and Presence Protocol (...
18
votes
2
answers
28k
views
Apache Camel vs Apache Kafka [duplicate]
As far as I know, Apache Kafka is asynchronous messaging platform, where as Apache Camel is a platform implementing the enterprise integration patterns.
So, what are the practical differences of ...
18
votes
1
answer
2k
views
Cluster-wide singleton in Websphere Cluster
I need to run a component using Apache Camel (or Spring Integration) under WAS ND 8.0 cluster. They both run some threads on startup, and stop them on shutdown normally. No problem to supply WAS ...
17
votes
1
answer
16k
views
Apache Camel http to http routing (Is it possible?)
I am starting now with Camel. I have seen the http4 component for http clients and the jetty component for http servers.
I have seen several examples that use one or the other.
I would like to know ...
17
votes
2
answers
6k
views
Distributed ActiveMQ with Camel
I am in the process of learning ActiveMQ and Camel, with the goal to create a little prototype system that works something like this:
(source: paulstovell.com)
(big)
When an order is placed in ...
17
votes
2
answers
4k
views
Apache Camel and Intellij Idea code format
Intellij Idea formats code in camel routs like this:
from("direct:loop")
.log("Loop: ${header[loopCount]}")
.choice()
.when(simple("header[loopCount] < 10"))
.process(exchange ...
16
votes
3
answers
22k
views
Best strategy for processing large CSV files in Apache Camel
I'd like to develop a route that polls a directory containing CSV files, and for every file it unmarshals each row using Bindy and queues it in activemq.
The problem is files can be pretty large (a ...
16
votes
1
answer
6k
views
Does Akka obsolesce Camel?
My understanding of Akka is that it provides a model whereby multiple, isolated threads can communicate with each other in a highly concurrent fashion. It uses the "actor model", where each thread is ...
16
votes
2
answers
23k
views
Apache-camel: Enabling bridgeEndpoint on the http endpoint
I created a simple route to get contact from a remote host. But, there seems to be a lot of confusion regarding the bridgeEndpoint option.
Initially, I added the route using the Java DSL as follows:
...
16
votes
3
answers
15k
views
Ordinary Queue vs SEDA Queue
Being new to Apache Camel, I was recently reviewing its long list of components and stumbled upon their support for SEDA queue components.
The page didn't make much sense to me, so I did a couple of ...
16
votes
5
answers
41k
views
Apache Camel Endpoint injection to direct route "No consumers available on endpoint"
I want to use Camel to take a message from ActiveMQ and then, based on the message contents (a protobuf), send one or more messages to Twitter. I've written a bean that is called from within a route ...
16
votes
2
answers
38k
views
What is CrashLoopBackOff status for openshift pods?
There is more than one example where I have seen this status from a pod running in openshift origin. In this case it was the quickstart for the cdi camel example. I was able to successfully build and ...
16
votes
1
answer
5k
views
Camel adviceWith behaves differently when changing the order of weave statements
I have the following route for demo purposes
from("direct:external")
.routeId("external")
.to("http4://www.third-party.com/foo").id("ext");
For testing, I would like to
* replace the http4: ...
16
votes
2
answers
31k
views
Can't access Amazon SQS - InvalidClientTokenId
I have an SQS queue set up in AWS. I can send and receive messages perfectly using the AWS CLI and my IAM credentials that I set up.
What I would like to do is consume messages from the queue using ...
15
votes
2
answers
17k
views
Camel - using end()
Is it a best practice to use end() for every route?
The following works:
from("jms:some-queue")
.beanRef("bean1", "method1")
.beanRef("bean2", "method2")
and so is this,
from("jms:...
15
votes
1
answer
21k
views
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 ...
14
votes
5
answers
44k
views
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 ...
14
votes
5
answers
31k
views
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 ...
14
votes
2
answers
49k
views
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 ...
14
votes
3
answers
35k
views
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 ...
14
votes
2
answers
12k
views
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 ...
14
votes
5
answers
34k
views
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 ...