damianiandrea / mongodb-nats-connector

A connector that uses MongoDB's change streams to capture data changes and publishes those changes to NATS JetStream.
MIT License
48 stars 7 forks source link

Connector fails to start when using changeStreamPreAndPostImages with MongoDB versions less than 6.0 #19

Closed damianiandrea closed 7 months ago

damianiandrea commented 7 months ago

Configuring the changeStreamPreAndPostImages in the connector.yaml file while using MongoDB versions prior to 6.0 causes the connector to fail at startup.

The goal of this PR is to write a WARN level log message that can better inform the user, and to prevent the connector from failing.

It also marks the changeStreamPreAndPostImages connector configuration as deprecated. The purpose of the connector was never to provide a way to configure MongoDB, and enabling such configuration should be done directly on the database.