For the sink connector - if it determines that a record should be updated, is it possible to have the connector only update the record if a field in the kafka message is greater than an existing field in mongo? (i.e. compare timestamps) Else, it would ignore and not update that record in mongo.
Thats a good question, you’d have to write your own custom write model strategy. Returning a null value indicates a no-op, theres an example in the documentation that should help get you started.
As @Ross_Lawley mentioned you can of course come up with any custom implementation for write model strategies that you might need for a specific use case. However, if I got you right, it might be your lucky day because somebody else - in this case my humble self - has written something for you. Either it fits as is for what you want to achieve or you can take it as a starting point and modify it to your needs.
NOTE: It needs MongoDB version 4.2+ and Java Driver 3.11+ since lower versions of either lack the support for leveraging update pipeline syntax which is needed to perform the conditional checks during write operations.