diff --git a/data-prepper-plugins/mongodb/src/main/java/org/opensearch/dataprepper/plugins/mongo/documentdb/DocumentDBSource.java b/data-prepper-plugins/mongodb/src/main/java/org/opensearch/dataprepper/plugins/mongo/documentdb/DocumentDBSource.java index 865eaf3781..b6ff1fbdf1 100644 --- a/data-prepper-plugins/mongodb/src/main/java/org/opensearch/dataprepper/plugins/mongo/documentdb/DocumentDBSource.java +++ b/data-prepper-plugins/mongodb/src/main/java/org/opensearch/dataprepper/plugins/mongo/documentdb/DocumentDBSource.java @@ -35,6 +35,8 @@ public class DocumentDBSource implements Source>, UsesEnhancedSour private final AcknowledgementSetManager acknowledgementSetManager; private DocumentDBService documentDBService; + private final boolean acknowledgementsEnabled; + @DataPrepperPluginConstructor public DocumentDBSource(final PluginMetrics pluginMetrics, final MongoDBSourceConfig sourceConfig, @@ -44,6 +46,7 @@ public DocumentDBSource(final PluginMetrics pluginMetrics, this.sourceConfig = sourceConfig; this.acknowledgementSetManager = acknowledgementSetManager; this.pluginConfigObservable = pluginConfigObservable; + this.acknowledgementsEnabled = sourceConfig.isAcknowledgmentsEnabled(); } @Override @@ -77,4 +80,9 @@ public void setEnhancedSourceCoordinator(EnhancedSourceCoordinator sourceCoordin public Function getPartitionFactory() { return new PartitionFactory(); } + + @Override + public boolean areAcknowledgementsEnabled() { + return acknowledgementsEnabled; + } }