Reputation: 4021
I'm trying to get the transaction metadata working with debezium 1.4.1.Final using a SQL Server database.
It seems to be working to some extent - the dbservername.transaction
topic has been created, and when I run a stored proc which contains a transaction, then the "status":"BEGIN"
event is received, along with the CDC packets on the table topic.
However, no "status":"END"
event is received... until I run the stored proc again.
It may very well be that I'm not closing the transaction in the stored proc correctly (I'm not a MSSQL expert by any means)...
This is the structure I'm using:
CREATE PROCEDURE schema.myproc
AS
BEGIN
BEGIN TRANSACTION
...
COMMIT;
END
GO
Any ideas what I need to do to get the END
event at the end of the proc?
Upvotes: 0
Views: 1045
Reputation: 19010
Unfortunately, there's no reliable way to emit the END event before the connector has received another transaction BEGIN event. Hence END events are delayed in case you don't have a continuous transaction load on your database.
You may consider to run some dummy transactions in a loop for triggering this. We're planning to support this OOTB via Debezium's heartbeat feature (see DBZ-3263); any help with that will surely be welcomed.
Upvotes: 2