Skip to content

Commit 3e32472

Browse files
committed
Updated startAfter support check
KAFKA-95
1 parent e0447a2 commit 3e32472

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/mongodb/kafka/connect/source/MongoSourceTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ private MongoCursor<BsonDocument> tryCreateCursor(final MongoSourceConfig source
245245
if (e.getErrorCode() == 260) {
246246
invalidatedCursor = true;
247247
return tryCreateCursor(sourceConfig, mongoClient, null);
248-
} else if (e.getErrorCode() == 40415 && e.getErrorMessage().contains("startAfter")) {
248+
} else if ((e.getErrorCode() == 9 || e.getErrorCode() == 40415) && e.getErrorMessage().contains("startAfter")) {
249249
supportsStartAfter = false;
250250
return tryCreateCursor(sourceConfig, mongoClient, resumeToken);
251251
}

0 commit comments

Comments
 (0)