apache-camel

How do I specify a TCP transport is server mode (listening) or client mode in activemq?

The example given for a spring injected endpoint is as follows: <endpoint id="hl7listener" uri="mina:tcp://localhost:8888?sync=true&amp;codec=hl7codec"/> How do I setup a client mode endpoint such that is will connect to a specific port on another server? How do I configure the endpoint to listen for inbound connections? (the example...

Simple Routing of TCP Endpoints in activemq whats wrong??

I am trying to get a simple demo started with ActiveMQ that will demonstrate a TCP to TCP route. I am coding the endpoints and routes in a camel context in my activemq.xml configuration file. <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring"&gt; <package>org.myorg.codec</package> <endpoint id="lis...

ActiveMQ setup of tcp socket using mina

I am trying to setup a simple demo of activemq and mina. I edited the camelContext in the activemq.xml file to include two mina tcp sockets, two queues and routes as such: listenerA -> qA -> listenerB listenerB -> qB -> listenerA The intent is to have two way pass through between two telnet sessions. Later, I will add more fancy feat...

Apache Camel question on routing via javaDSL

When using routing in a Camel context via RouteBuilder, What is the practical difference between: 1) from(A).to(B).to(C); 2) from(A).to(B); from(B).to(C) ...

Unable to start Camel 1.5.0

Hi, I'm trying to run the Camel Example "camel-example-spring-jms" (also at http://activemq.apache.org/camel/tutorial-jmsremoting.html). However, when I try to start Camel using "org.apache.camel.spring.Main" class, I get the error saying "Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://...

Dynamic throtlling off an ActiveMQ message queue with Camel

I am an ActiveMQ / Camel noob with a specific scenario in mind, I wonder firstly if it is possible and secondly whether someone might provide a little direction. Basically I need to perform dynamic throttling off the queue. I.E the ability to set at runtime the rate a particular group of messages will be consumed from the queue. So I m...

Apache Camel for Asynchronous Calls

Does it make sense to use Apache Camel for Asynchronous requests? Or should I use simple MoM using a JMS server. There are no Enterprise Integration Patterns that I'll require. Any help would be useful. ...

Installing Grails with Apache Camel plugin

I'm having trouble getting the Apache Camel plugin to run in grails-1.1.1. Here's the steps I took: $ grails create-app camelapp Welcome to Grails 1.1.1 - http://grails.org/ ... $ cd camelapp $ grails run-app ... Running Grails application.. Server running. Browse to http://localhost:8080/camelapp $ grails install-plugin camel ... C...

Accessing domain classes or spring beans from camel routes in Grails

I have a camel route file which I want to populate/configure based on certain database records accessed through Grails domain classes. However, I cannot seem to access the domain classes (or anything in the spring context) from MyRoute.groovy. Any ideas on how I can make that possible? I tried the recommendations at http://stackoverflow...

How to change Processor properties during runtime using Camel?

I have a Camel Route Definition written in Java DSL like this: from(myEndpoint) .throttle(200) .to(myOtherEndpoint); This connects my two endpoints using a Throttler which limits the message flow to 200 messages per second. I'm looking for a way to change the maximumRequestCount / second during runtime. So I need to somehow get to ...

Apache Camel Spring configuration problem - 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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang" xmlns:util="http://www.springframework.org...

Some special Apache Camel functions are not available

trying to use this route: from("activemq:profiles").aggregate(header("cheese")).batchSize(30).bean(ProfilesQueueService, "saveContacts") Fails with: No signature of method: org.apache.camel.model.RouteType.aggregate() is applicable for argument types: (org.apache.camel.builder.ValueBuilder) values: [header(cheese)] Using apache camel ...

Groovy statement fails if used inside Camel route

Defined routes: from("direct:friends").process({exchange -> exchange.'out'.body = exchange.'in'.body.profile} as Processor).splitter(body(List), true).to("activemq:profiles") from("direct:profiles").process({exchange -> exchange.'out'.body = exchange.'in'.body.friends} as Processor).to("activemq:profiles") Fails with some: jav...

CamelContext.start() doesn't block

Hi, I want to run a simple Apache Camel example that copies files from one directory to another: CamelContext context = new DefaultCamelContext(); context.addRoutes(new RouteBuilder() { public void configure () throws Exception { from("file://c:/fromdir/").to("file://c:/todir/"); } }); context.start(); If I run this example...

Apache Camel 2.x and Servicemix 3.x/4

I'm trying to run Camel 2.1 SU with Servicemix. As i understand there are no way to run Camel 2 with Servicemix 3, and i'm try to run it with FUSE Servicemix 4.0.0.1 When i starting my project with maven: mvn jbi:servicemix i receive following error: unexpected element (uri:"http://camel.apache.org/schema/spring", local:"camelContext")...

How to start Camel routes on slave ActiveMQ only when slave becomes active in failover?

I have a durable consumer to a remote JMS queue in embedded Camel routing. Is it possible to have this kind of routing with master-slave configuration? Now it seems that the Camel routes are started and activated already when slave ActiveMQ is started and not when the actual failover happens. Now it causes the slave instance to receive ...

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 message and have camel take over the forwarding and routing. Did I understand correctly that that the Producer is responsible for sending ...

Apache camel without maven

I have a hard time finding documentation/tutorials or just getting a dependency overview without going into some spiralling maven-nightmare. I even have trouble getting the examples to work, as its an endless compile,run,search,repeat routine. Can anyone recommend some information resources for someone not succombing to the maven-press...

Using Camel 2.1 with Grails 1.2.1 - Classloading problem

I'm trying to define a Camel context in my Grails application. resource.groovy: xmlns camel: 'http://camel.apache.org/schema/spring' camel { camelContext(id:'camelContext') { } } Results in a stacktrace containing: 2010-02-03 13:24:42,209 [main] ERROR spring.GrailsRuntimeConfigurator - [RuntimeConfiguration] Unable to l...

Apache Camel with ActiveMQ clustering

I'm trying to determine my options for clustering my ServiceMix 3.3.1/Camel 2.1/AMQ 5.3 application. I'm performing high volume message processing and I need to cluster for high availability and horizontal scalability. Here is basically what my application does...HTTP->QUEUE->PROCESS->DATABASE->TOPIC from("jetty:http://0.0.0.0/inbound...