diff --git a/README.md b/README.md index 39a9d8f..2941b80 100644 --- a/README.md +++ b/README.md @@ -80,8 +80,8 @@ Single Message Transforms, or SMTs, can be used to customize fields or values of ``` 1. If you have events where there is no value ([_tombstone_ events](https://kafka.apache.org/documentation.html#compaction)), you may wish to filter these out. - In the Cloudant sink connector, these may be undesirable as they will generate an empty document. - - In the Cloudant source connector, tombstone events are generated by default for deleted documents (in addition to the deleted document itself). - - In either case, you will need to use a `dropNullRecords` transform and predicate to filter out and remove these tombstone events: + - In the Cloudant source connector, tombstone events are generated for deleted documents (in addition to the deleted document itself). + - In either case, you can use the `RecordIsTombstone` predicate with a filter to remove these tombstone events as shown in this example: ``` transforms=dropNullRecords diff --git a/src/test/java/com/ibm/cloud/cloudant/kafka/connect/TombstoneTest.java b/src/test/java/com/ibm/cloud/cloudant/kafka/connect/TombstoneTest.java index 15db7f2..03ed730 100644 --- a/src/test/java/com/ibm/cloud/cloudant/kafka/connect/TombstoneTest.java +++ b/src/test/java/com/ibm/cloud/cloudant/kafka/connect/TombstoneTest.java @@ -27,8 +27,9 @@ public class TombstoneTest { private static final String connectionName = "_mock"; + // test that both the original document with _deleted = true, and a tombstone are emitted @Test - public void foo() throws Exception{ + public void testDeletedDocumentEmitsTombstone() throws Exception{ String id = "123";