Interface TransactionStructMaker

All Known Implementing Classes:
AbstractTransactionStructMaker, DefaultTransactionStructMaker

public interface TransactionStructMaker
Interface to define how to make transaction structs, both when adding them to data change events and when creating separate transaction metadata events (e.g., for begin/end)
  • Field Details

  • Method Details

    • addTransactionBlock

      org.apache.kafka.connect.data.Struct addTransactionBlock(OffsetContext offsetContext, long dataCollectionEventOrder, org.apache.kafka.connect.data.Struct value)
      Adds the transaction block to the data change message
      Parameters:
      offsetContext - current offsetContext used to get transaction metadata
      dataCollectionEventOrder - the event order for the data collection of this transaction
      value - the data change struct to add the transaction block to
      Returns:
      the updated struct with the transaction block
    • buildEndTransactionValue

      org.apache.kafka.connect.data.Struct buildEndTransactionValue(OffsetContext offsetContext, Instant timestamp)
      Creates the value struct for a transaction end message
      Parameters:
      offsetContext - current offsetContext used to get transaction metadata
      timestamp - timestamp of the transaction
      Returns:
      end transaction struct
    • buildBeginTransactionValue

      org.apache.kafka.connect.data.Struct buildBeginTransactionValue(OffsetContext offsetContext, Instant timestamp)
      Creates the value struct for a transaction begin message
      Parameters:
      offsetContext - current offsetContext used to get transaction metadata
      timestamp - timestamp of the transaction
      Returns:
      begin transaction struct
    • buildTransactionKey

      org.apache.kafka.connect.data.Struct buildTransactionKey(OffsetContext offsetContext)
      Creates the key struct for the transaction message
      Parameters:
      offsetContext - current offsetContext used to get transaction metadata
      Returns:
      key transaction struct
    • getTransactionBlockSchema

      org.apache.kafka.connect.data.Schema getTransactionBlockSchema()
      Get the schema for the transaction block in a data change event
      Returns:
    • getEventCountPerDataCollectionSchema

      org.apache.kafka.connect.data.Schema getEventCountPerDataCollectionSchema()
      Get the schema for the event count per data collection
      Returns:
    • getTransactionKeySchema

      org.apache.kafka.connect.data.Schema getTransactionKeySchema()
      Get the schema for the transaction key of a begin/end event
      Returns:
    • getTransactionValueSchema

      org.apache.kafka.connect.data.Schema getTransactionValueSchema()
      Get the schema for the transaction value of a begin/end event
      Returns: