Hello again,
We recently upgraded our sharded mongodb cluster to 4.2.0+ and encountered an issue where we wanted upserts but the mongodb connector creates upserts which only match on the _id field and our sharded collections have compound shard keys.
I created a writemodel strategy which creates upserts that can be configured to target multiple fields, hopefully it can be of use. As before I have included tests,
https://github.com/mongodb/mongo-kafka/pull/16
Thanks!
-Pat