camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dvsridhar <>
Subject couchdb component stops listening couchdb changes
Date Thu, 04 Sep 2014 04:31:32 GMT

We are struggling a bit to make the couch db component work for our use
case, essentially we need to consume all inserts, updates and deletes from a
CouchDB instance. The couchdb component is acting little weird (sure, i am
doing something wrong), *the minute the route gets started if we make some
updates to couchdb then those changes are getting consumed by the couchdb
consumer, however if you stop doing updates for a minute then we don't see
the changes getting consumed by the consumer. The only way to start
consuming the messages is to re-start the server.* 

To prove this i downloaded our regular camel-archetype-java and ran a simple
java route and i see the same behavior.

We tried camel 2.13 and 2.11 (since this component being introduced in this
version) and we see the same behavior in both versions. 

We captured some wireshark logs and i can clearly see couchdb changes are
going to camel and in turn camel is sending an ack back.

After trying so many different options. I tried lightcouch based example and
that works perfectly fine and receives message if any of you need that
example i can post that as well. 

If this camel component doesn't work then our last option to stand up that
standalone application which i hate to do that. 

My google search hardly found any related issues/fixes. So, any help greatly

Arch type used for debugging
mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes
-DarchetypeArtifactId=camel-archetype-java -DarchetypeVersion=2.11.0 
-DgroupId=couchrouteGrou -DartifactId=couchroutetest  

Source Code;

CouchRouteBuilder .java
import org.apache.camel.builder.RouteBuilder;

 * A Camel Java DSL Router
public class CouchRouteBuilder extends RouteBuilder {

     * Let's configure the Camel routing rules using Java code...
    public void configure() {


CouchDBMomReqProcessor .java
import org.apache.camel.Exchange;
import org.apache.camel.Processor;

public class CouchDBMomReqProcessor implements Processor{

	public void process(Exchange exchange) throws Exception {	
	String payload = exchange.getIn().getBody(String.class);
    // do something with the payload and/or exchange here
	System.out.println("Changes from CouchDB -->"+payload);


import org.apache.camel.main.Main;

 * A Camel Application
public class MainApp {

     * A main() so we can easily run these routing rules in our IDE
    public static void main(String... args) throws Exception {
        Main main = new Main();
        main.addRouteBuilder(new CouchRouteBuilder());;


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message