Hi

Thanks for reporting.

It sounds like camel-couchdb lacks some keep alive or failover logic
or something to be configured on the lightcouch it uses.

I suggest you drill down the source code of camel-couchdb and compare
to your working solution with lightcouch. Maybe you can find what is
missing.

We love contributions so you are welcome to log a JIRA and work on a patch
http://camel.apache.org/contributing.html

On Thu, Sep 4, 2014 at 6:31 AM, dvsridhar
<[email protected]> wrote:
> Hi,
>
> 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
> appreciated.
>
> 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() {
>         from("couchdb:http://localhost:5984/ccdb?deletes=false";).process(new
> CouchDBMomReqProcessor());
>     }
>
> }
>
> CouchDBMomReqProcessor .java
> ------------
> import org.apache.camel.Exchange;
> import org.apache.camel.Processor;
>
> public class CouchDBMomReqProcessor implements Processor{
>
>         @Override
>         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);
> }
>
> }
>
> MainApp.java
> -------
>
> 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.enableHangupSupport();
>         main.addRouteBuilder(new CouchRouteBuilder());
>         main.run(args);
>     }
>
> }
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/couchdb-component-stops-listening-couchdb-changes-tp5756038.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Reply via email to