Mongo Kafka Connector Collection Listen Limitations


We have several collections based on n tenants and want the kafka connector to only watch for specific collections.

Below is my file where I have added the pipeline filter to listen only to specific collections.It works


the collections will grow in the future to maybe 200 collections which have to be watched, wanted to know the below three things

  1. is their some performance impact with one connector listening to huge number of collections ?
  2. is their any limit on the collections one connector can watch ?
  3. what would be the best practice, to run one connector listening to 100 collections or 10 different connectors listening to 10 collections each ?

Harinder Singh

Can we also specify regex lookup , that watch all collections specific to some regex.

You can accomplish that by setting the database property then use a pipeline to match the collection name, something like:

"pipeline" : "[ { $match: { \"ns.coll\": { \"$in\": [\"<collection_1>\", \"<collection_2>\", \"<collection_3>\" ] } } } ]",

is their any limitation on the number of collections one connector can listen to ?

No limit you’ll eventually run into a query size limit if you make your pipeline too long but outside of that there is no predefined limit