From ab86cd18a93240997b1a6794ace2efb46f61f35d Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Thu, 18 Nov 2021 14:03:20 -0500 Subject: [PATCH] DBZ-4012 Suggested changes --- .../mongodb/transforms/outbox/MongoEventRouter.java | 2 ++ .../transforms/outbox/EventRouterConfigDefinition.java | 4 ++-- .../pages/transformations/mongodb-outbox-event-router.adoc | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/debezium-connector-mongodb/src/main/java/io/debezium/connector/mongodb/transforms/outbox/MongoEventRouter.java b/debezium-connector-mongodb/src/main/java/io/debezium/connector/mongodb/transforms/outbox/MongoEventRouter.java index f7f8bf1b8..a457832c0 100644 --- a/debezium-connector-mongodb/src/main/java/io/debezium/connector/mongodb/transforms/outbox/MongoEventRouter.java +++ b/debezium-connector-mongodb/src/main/java/io/debezium/connector/mongodb/transforms/outbox/MongoEventRouter.java @@ -23,6 +23,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import io.debezium.common.annotation.Incubating; import io.debezium.config.Configuration; import io.debezium.connector.mongodb.transforms.ExtractNewDocumentState; import io.debezium.connector.mongodb.transforms.MongoDataConverter; @@ -36,6 +37,7 @@ * * @author Sungho Hwang */ +@Incubating public class MongoEventRouter> implements Transformation { private static final Logger LOGGER = LoggerFactory.getLogger(MongoEventRouter.class); diff --git a/debezium-core/src/main/java/io/debezium/transforms/outbox/EventRouterConfigDefinition.java b/debezium-core/src/main/java/io/debezium/transforms/outbox/EventRouterConfigDefinition.java index 2702209e8..d4bd8862a 100644 --- a/debezium-core/src/main/java/io/debezium/transforms/outbox/EventRouterConfigDefinition.java +++ b/debezium-core/src/main/java/io/debezium/transforms/outbox/EventRouterConfigDefinition.java @@ -118,11 +118,11 @@ public String getAlias() { } public static final Field OPERATION_INVALID_BEHAVIOR = Field.create("table.op.invalid.behavior") - .withDisplayName("Behavior when the route fails to apply") + .withDisplayName("Behavior when capturing an unexpected outbox event") .withEnum(InvalidOperationBehavior.class, InvalidOperationBehavior.SKIP_AND_WARN) .withWidth(ConfigDef.Width.MEDIUM) .withImportance(ConfigDef.Importance.MEDIUM) - .withDescription("While Debezium is capturing changes from the table, it's expecting only to see 'create' row events," + + .withDescription("While Debezium is capturing changes from the outbox table, it is expecting only to process 'create' or 'delete' row events;" + " in case something else is processed this transform can log it as warning, error or stop the" + " process."); diff --git a/documentation/modules/ROOT/pages/transformations/mongodb-outbox-event-router.adoc b/documentation/modules/ROOT/pages/transformations/mongodb-outbox-event-router.adoc index da0d1a3c7..3684b858a 100644 --- a/documentation/modules/ROOT/pages/transformations/mongodb-outbox-event-router.adoc +++ b/documentation/modules/ROOT/pages/transformations/mongodb-outbox-event-router.adoc @@ -325,14 +325,14 @@ The following table describes the options that you can specify for the outbox ev |[[mongodb-outbox-event-router-property-collection-op-invalid-behavior]]<> |`warn` |Collection -a|Determines the behavior of the SMT when there is an `UPDATE` operation on the outbox collection. Possible settings are: +a|Determines the behavior of the SMT when there is an update operation on the outbox collection. Possible settings are: * `warn` - The SMT logs a warning and continues to the next outbox collection document. * `error` - The SMT logs an error and continues to the next outbox collection document. * `fatal` - The SMT logs an error and the connector stops processing. -All changes in an outbox collection are expected to be `INSERT` operations. That is, an outbox collection functions as a queue; updates to documents in an outbox collection are not allowed. -The SMT automatically filters out `DELETE` operations on an outbox collection. +All changes in an outbox collection are expected to be an insert or delete operation. That is, an outbox collection functions as a queue; updates to documents in an outbox collection are not allowed. +The SMT automatically filters out delete operations (for removing proceeded outbox events) on an outbox collection. |[[mongodb-outbox-event-router-property-collection-field-event-id]]<> |`_id`