Mongo Change stream pre-image support

24 views
Skip to first unread message

Xinbin Huang

unread,
Sep 19, 2022, 4:49:58 PM9/19/22
to debezium
Hi friends, 

Mongo 6.0 now officially supports emitting document pre-image in change streams. Our team is currently investigating on how we can capture the pre-image information from Debezium. 

I think a potential implementation can be 
- a config flag to enable capturing pre-image from change stream i.e. change_stream_preimage 
- an extra before field in the change event to captures the pre-image. This behavior is the same as other DBs e.g. postgres, mysql.

Any thoughts? 

Best
Bin


jiri.p...@gmail.com

unread,
Sep 20, 2022, 1:29:13 AM9/20/22
to debezium
Hi,

great news, thanks for handling that feature! I agree with using before field in the same way we already use after when full updates are enabled.

For the configuration could we reuse https://debezium.io/documentation/reference/2.0/connectors/mongodb.html#mongodb-property-capture-mode ? In that case it will be multistate

- no before/after
- after only
- before only
- both before/after

WDYT?

J.

Xinbin Huang

unread,
Sep 20, 2022, 1:16:31 PM9/20/22
to debe...@googlegroups.com
Hi J.,

We can definitely reuse the current capture mode config. I've created a draft PR. Let's continue the discussion on implementation there?

Bin

--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/7787b553-b4dd-414c-b00a-22a9ae81ce03n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages