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 279e069 CAMEL-11977: MongoDB Tailable cursor consumer fails to stop on shutdown 279e069 is described below commit 279e069232028e1e8cbaeb3de89b3ef0a666fecb Author: Igor Paliychuk <mansoni...@gmail.com> AuthorDate: Thu Nov 2 18:16:39 2017 +0200 CAMEL-11977: MongoDB Tailable cursor consumer fails to stop on shutdown --- .../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 6192949..d7018a7 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 { - while (cursor.hasNext() && keepRunning) { //cursor.getCursorId() != 0 && - DBObject dbObj = cursor.next(); + DBObject dbObj = null; + while ((dbObj = cursor.tryNext()) != null && keepRunning) { //cursor.getCursorId() != 0 && Exchange exchange = endpoint.createMongoDbExchange(dbObj); try { if (LOG.isTraceEnabled()) { -- To stop receiving notification emails like this one, please contact ['"commits@camel.apache.org" <commits@camel.apache.org>'].