how to configure debezium fields sent on update ev

2019-08-27 15:19发布

问题:

I want to use debezium mongo connector to:

-> get events from mongo

-> get them in my kafka

-> read from kafka

my issue is, when debezium gets update events from mongo it only sends the updated fields:

The value of an update change event on this collection will actually have the exact same schema, and its payload will be structured the same but will hold different values. Specifically, an update event will not have an after value and will instead have a patch string containing the JSON representation of the idempotent update operation.

and I was wondering if i can configure it somehow cause there are some fields I would like to get with the updates events.

回答1:

you should be able to solve the problem using Kafka Streams - in a similar (simplified) way as in this case https://debezium.io/blog/2018/03/08/creating-ddd-aggregates-with-debezium-and-kafka-streams/