This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 6bc1f7173ff7e4fcc66846341a1eecb68ef1916b
Author: Otavio Rodolfo Piske <opi...@redhat.com>
AuthorDate: Wed Oct 20 17:17:16 2021 +0200

    (chores) camel-couchdb: delay changes notification initialization
    
    This moves the notification initialization to the change set tracker thread 
and prevent a very slow initialization of the component.
---
 .../org/apache/camel/component/couchdb/CouchDbChangesetTracker.java    | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbChangesetTracker.java
 
b/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbChangesetTracker.java
index 3d957d9..ab110d1 100644
--- 
a/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbChangesetTracker.java
+++ 
b/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbChangesetTracker.java
@@ -39,7 +39,6 @@ public class CouchDbChangesetTracker implements Runnable {
         this.endpoint = endpoint;
         this.consumer = consumer;
         this.couchClient = couchClient;
-        initChanges(null);
     }
 
     private void initChanges(final String sequence) {
@@ -54,8 +53,8 @@ public class CouchDbChangesetTracker implements Runnable {
 
     @Override
     public void run() {
-
         String lastSequence = null;
+        initChanges(null);
 
         try {
             while (!stopped) {

Reply via email to