Dynamic Topic Mapping on the basis of message content
Currently mongodb source connector only supports dynamic topic mapping on the bases of collections/databases. Can we extend it to support routing on the basis of message content?
Why it's important?
We've currently setup connector for a very large collection but since we wanted to route the data for different sections to different topics, we had to setup separate connector for each and define the filter in the pipeline section (it runs as an aggregate query on changestreams to filter out the relevant data). Now obviously it created performance concerns as large number of collscan queries started to run on these changestreams to filter out the data for respective connector. And also there's a restriction to create indexes on change streams so we can't take advantage of that. This became a problem for us.
Thus adding support for above would solve the issues for us as well for anyone who's following above as the workaround. I've seen some community posts of the same as well.
![](https://secure.gravatar.com/avatar/61bdd9cc1177ecc03a57652c4aaaee46?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)