File tree 2 files changed +19
-1
lines changed
src/main/java/com/mongodb/kafka/connect/source 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 17
17
- [ KAFKA-75] ( https://jira.mongodb.org/browse/KAFKA-75 ) Added specific configuration for the id strategies: ` ProvidedInKeyStrategy ` and ` ProvidedInValueStrategy ` .
18
18
Added ` document.id.strategy.partial.value.projection.type ` , ` document.id.strategy.partial.value.projection.list ` ,
19
19
` document.id.strategy.partial.key.projection.type ` and ` document.id.strategy.partial.key.projection.list ` .
20
+ - [ KAFKA-91] ( https://jira.mongodb.org/browse/KAFKA-91 ) Improved the error messaging for the missing resume tokens in the source connector.
20
21
21
22
## 1.1.0
22
23
- [ KAFKA-45] ( https://jira.mongodb.org/browse/KAFKA-45 ) Allow the Sink connector to ignore unused source record key or value fields.
Original file line number Diff line number Diff line change @@ -273,7 +273,24 @@ private MongoCursor<BsonDocument> tryCreateCursor(
273
273
return tryCreateCursor (sourceConfig , mongoClient , resumeToken );
274
274
}
275
275
}
276
- LOGGER .info ("Failed to resume change stream: {} {}" , e .getErrorMessage (), e .getErrorCode ());
276
+ LOGGER .warn (
277
+ "Failed to resume change stream: {} {}\n "
278
+ + "=====================================================================================\n "
279
+ + "If the resume token is no longer available then there is the potential for data loss.\n "
280
+ + "Saved resume tokens are managed by Kafka and stored with the offset data.\n \n "
281
+ + "When running Connect in standalone mode offsets are configured using the:\n "
282
+ + "`offset.storage.file.filename` configuration.\n "
283
+ + "When running Connect in distributed mode the offsets are stored in a topic.\n \n "
284
+ + "Use the `kafka-consumer-groups.sh` tool with the `--reset-offsets` flag to reset\n "
285
+ + "offsets.\n \n "
286
+ + "Resetting the offset will allow for the connector to be resume from the latest resume\n "
287
+ + "token. Using `copy.existing=true` ensures that all data will be outputted by the\n "
288
+ + "connector but it will duplicate existing data.\n "
289
+ + "Future releases will support a configurable `errors.tolerance` level for the source\n "
290
+ + "connector and make use of the `postBatchResumeToken`.\n "
291
+ + "=====================================================================================\n " ,
292
+ e .getErrorMessage (),
293
+ e .getErrorCode ());
277
294
return null ;
278
295
}
279
296
}
You can’t perform that action at this time.
0 commit comments