Hi Sachin, flink-connector-mongodb supports batch reading and writing to MongoDB, similar to flink-connector-jdbc, while flink-connector-mongodb-cdc supports streaming MongoDB changes.
If you need to stream MongoDB changes, you should use flink-connector-mongodb-cdc. You can refer to the following documentation about mongodb cdc. https://nightlies.apache.org/flink/flink-cdc-docs-release-3.1/docs/connectors/flink-sources/mongodb-cdc/ Best, Jiabao On 2024/08/16 09:46:47 Sachin Mittal wrote: > Hi, > I have a scenario where I load a collection from MongoDB inside Flink using > flink-connector-mongodb. > What I additionally want is any future changes (insert/updates) to that > collection is also streamed inside my Flink Job. > > What I was thinking of is to use a CDC connector to stream data to my Flink > job. > > When researching this I found Flink CDC and they have a CDC connector for > MongoDB - flink-connector-mongodb-cdc > > > However I am not able to figure out how to stream those changes also to my > Job which is also reading from the same collection. > > Thanks > Sachin >