Skip to main content

Handling begin/commit CDC events

For WAEvent originating from OLTP sources:

  • If "Filter Source Transaction Boundary" is enabled at the source, the target will not receive any control events.

Distribution

  • All events including Begin/Commit events will be sent to partition 0 if no partition key is specified. Each control event will be mapped to a separate Kafka Message.

  • Dynamic value is set

    • If incoming events are distributed across multiple topics or partitions using metadata or user data keys, then:

      • Begin/Commit events cannot be distributed if they do not have the configured keys, and will be discarded from processing.

      • Begin/Commit events will be mapped to Kafka messages and distributed only if they contain the configured metadata or user data keys.

  • Partition: Primary Key

    • Begin/Commit events do not have table-level or primary key information. Therefore, control events will be discarded.

Schema tracking

If the Avro formatter is used:

  • A separate schema for control events will be created and registered under the subject name: <subject-name>_ControlRecord.

  • The schema ID of the control event schema will be included along with the event.

Message structure

Header

  • If a custom header is configured and the required metadata or user data is present, it will be added to the control event header.

  • Otherwise, the control event header will remain empty (might only have the Striim imprint header).

Key

  • Custom : If configured values (e.g. operation type or table name) are present as part of the user data or metadata, they will be set as the message key

  • PrimaryKey : Control events will not have table-level information, so the message key will be empty.

Sample messages

Begin event

{
  "pos" : null,
  "_id" : null,
  "timeStamp" : 1753773949048,
  "originTimeStamp" : 1753773949048,
  "key" : null,
  "sourceUUID" : {
    "uuidstring" : "01f06c4d-1479-97c1-a333-2263d47ddc93"
  },
  "data" : [ "waction", "BEGIN" ],
  "metadata" : {
    "BinlogFile" : "ON.000039",
    "TxnID" : "1:000039:2533:1753773949000",
    "OperationName" : "BEGIN",
    "TimeStamp" : 1753773949000,
    "OPERATION_TS" : 1753773949000,
    "BinlogPosition" : 2533
  },
  "userdata" : null,
  "before" : null,
  "dataPresenceBitMap" : "Aw==",
  "beforePresenceBitMap" : "AA==",
  "typeUUID" : null,
  "aidata" : null
}
  • In the formatAs default mode the control events will have the data, metadata and the user data from the incoming WAEvent.

Begin/Commit Event Schema - Format As : Default

Kafka Message Key : {  "TxnID": "1:000039:2897:1753774226000"  }      

Kafka Message Value : 
{
  "metadata" : {
    "BinlogFile" : "ON.000039",
    "TxnID" : "1:000039:2897:1753774226000",
    "OperationName" : "BEGIN",
    "TimeStamp" : "2025-07-29T00:30:26.000-07:00",
    "OPERATION_TS" : "1753774226000",
    "BinlogPosition" : "2897"
  },
  "data" : {
    "0" : "waction",
    "1" : "BEGIN"
  },
  "before" : null,
  "userdata" : null
}

Generic Record for Begin/Commit Event - Format As : Default

Kafka Message Key : {  "TxnID": "1:000039:2897:1753774226000"  }      

Kafka Message Value : 
{
  "metadata" : {
    "BinlogFile" : "ON.000039",
    "TxnID" : "1:000039:2897:1753774226000",
    "OperationName" : "BEGIN",
    "TimeStamp" : "2025-07-29T00:30:26.000-07:00",
    "OPERATION_TS" : "1753774226000",
    "BinlogPosition" : "2897"
  },
  "data" : {
    "0" : "waction",
    "1" : "BEGIN"
  },
  "before" : null,
  "userdata" : null
}
  • In the formatAs native mode the control events will have only the metadata and the user data from the incoming WAEvent.

Begin/Commit Event Schema - FormatAs: Native

{
  "type" : "record",
  "name" : "WAEvent",
  "namespace" : "WAEvent_ControlRecord.WAEvent",
  "fields" : [ {
    "name" : "metadata",
    "type" : [ "null", {
      "type" : "map",
      "values" : [ "null", "string" ]
    } ]
  }, {
    "name" : "userdata",
    "type" : [ "null", {
      "type" : "map",
      "values" : [ "null", "string" ]
    } ]
  } ]
}

Generic Record for Begin/Commit Event - Format As : Native

Kafka Message Key : {  "TxnID": "1:000039:3261:1753774575000"  }      

{
  "metadata" : {
    "BinlogFile" : "ON.000039",
    "TxnID" : "1:000039:3261:1753774575000",
    "OperationName" : "BEGIN",
    "TimeStamp" : "2025-07-29T00:36:15.000-07:00",
    "OPERATION_TS" : "1753774575000",
    "BinlogPosition" : "3261"
  },
  "userdata" : null
}
  • In the formatAs table mode, control events will be skipped, as the events are mapped more closely to the underlying table structure.