Transactional handling for Debezium PG CDC #81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are some things here that could be teased apart, but it is probably good just to see what it's working towards. This was done for a POC of honoring transactaional metadata produced by Debezium - in particular for postgresql.
With a config that includes new serdes and a transactions topic, such as:
One can consume the events from https://github.com/debezium/debezium-examples/tree/master/kstreams-fk-join with the connector configured with "provide.transaction.metadata": "true" and emit denormalizations that are consistent with the transaction boundaries. It also degrades if transaction metadata is not available to the normal eventually consistent processing. Please reach out if something like that is of interest.
In the earliest commit I'm trying to address redundant or unnecessary deserialization by holding onto the deserialized value and making getting the old value for filtering optional. It also add support for wrapped debezium json cdc events.
In the next commit there's code to make for a tighter polling loop to avoid setting or incurring a polling timeout on topics that don't change much.
Let me know if you want separate PRs for those changes.