Package io.debezium.pipeline.txmetadata
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.kafka.connect.data.StructaddTransactionBlock(OffsetContext offsetContext, long dataCollectionEventOrder, org.apache.kafka.connect.data.Struct value) Adds the transaction block to the data change messageorg.apache.kafka.connect.data.StructbuildBeginTransactionValue(OffsetContext offsetContext, Instant timestamp) Creates the value struct for a transaction begin messageorg.apache.kafka.connect.data.StructbuildEndTransactionValue(OffsetContext offsetContext, Instant timestamp) Creates the value struct for a transaction end messageorg.apache.kafka.connect.data.StructbuildTransactionKey(OffsetContext offsetContext) Creates the key struct for the transaction messageorg.apache.kafka.connect.data.SchemaGet the schema for the event count per data collectionorg.apache.kafka.connect.data.SchemaGet the schema for the transaction block in a data change eventorg.apache.kafka.connect.data.SchemaGet the schema for the transaction key of a begin/end eventorg.apache.kafka.connect.data.SchemaGet the schema for the transaction value of a begin/end event
-
Field Details
-
DEBEZIUM_TRANSACTION_KEY
- See Also:
-
DEBEZIUM_TRANSACTION_ID_KEY
- See Also:
-
DEBEZIUM_TRANSACTION_TOTAL_ORDER_KEY
- See Also:
-
DEBEZIUM_TRANSACTION_DATA_COLLECTION_ORDER_KEY
- See Also:
-
DEBEZIUM_TRANSACTION_STATUS_KEY
- See Also:
-
DEBEZIUM_TRANSACTION_EVENT_COUNT_KEY
- See Also:
-
DEBEZIUM_TRANSACTION_COLLECTION_KEY
- See Also:
-
DEBEZIUM_TRANSACTION_DATA_COLLECTIONS_KEY
- See Also:
-
DEBEZIUM_TRANSACTION_TS_MS
- See Also:
-
-
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 metadatadataCollectionEventOrder- the event order for the data collection of this transactionvalue- 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 metadatatimestamp- 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 metadatatimestamp- timestamp of the transaction- Returns:
- begin transaction struct
-
buildTransactionKey
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:
-