I'm doing some testing to see how can we can aggregate some information from different topics. For experimenting with this, I have created a connector which turns transaction metadata on and also started listening to the transaction topic.
To test, I run the commands sequence on sqlplus for the demo database:
As mentioned, I have debezium set up and I do also have a command line kafka consumer to debug the data that goes through the different topics. This is what I do get immediately after running the above sql script ( I am omitting schemas for the sake of verbosity ):
A couple of things to note here:
- Note that the messages arrive in exactly that order, i.e. END arrives first and then BEGIN. I'm not sure if that is how it is expected to be. Documentation certainly shows first BEGIN and finally END.
- Strangely, the id is different. The id of the BEGIN event matches the tx ids that I see on the table topics. However, the id of the END event, I have no idea where that comes from.
- event_count is 1 on the END event, but that is probably related to the fact that the event seems to come from a totally unrelated transaction.
In the individual transactions, total_order looks good, data_collection_order I'm not sure as the documentation states: "data_collection_order - the per-data collection position of the event among all events that were emitted by the transaction". Note that in both the tx id is 04001E0088020000 which matches the BEGIN event in the transaction topic.