You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/11/03 09:09:49 UTC

[camel] branch camel-2.20.x updated: Revert "CAMEL-11977: MongoDB Tailable cursor consumer fails to stop on shutdown"

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

davsclaus pushed a commit to branch camel-2.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.20.x by this push:
     new 7930624  Revert "CAMEL-11977: MongoDB Tailable cursor consumer fails to stop on shutdown"
7930624 is described below

commit 793062481d37b0da4d9890f9bd897cec76e0e2c0
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Nov 3 10:09:35 2017 +0100

    Revert "CAMEL-11977: MongoDB Tailable cursor consumer fails to stop on shutdown"
    
    This reverts commit 279e069232028e1e8cbaeb3de89b3ef0a666fecb.
---
 .../org/apache/camel/component/mongodb/MongoDbTailingProcess.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbTailingProcess.java b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbTailingProcess.java
index d7018a7..6192949 100644
--- a/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbTailingProcess.java
+++ b/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbTailingProcess.java
@@ -158,8 +158,8 @@ public class MongoDbTailingProcess implements Runnable {
         boolean persistRegularly = persistRecords > 0;
         // while the cursor has more values, keepRunning is true and the cursorId is not 0, which symbolizes that the cursor is dead
         try {
-            DBObject dbObj = null;
-            while ((dbObj = cursor.tryNext()) != null && keepRunning) { //cursor.getCursorId() != 0 &&
+            while (cursor.hasNext() && keepRunning) { //cursor.getCursorId() != 0 &&
+                DBObject dbObj = cursor.next();
                 Exchange exchange = endpoint.createMongoDbExchange(dbObj);
                 try {
                     if (LOG.isTraceEnabled()) {

-- 
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].