Class TransactionalIdFactory


  • @Internal
    public class TransactionalIdFactory
    extends Object
    Utility class for constructing transactionalIds for Kafka transactions.
    • Constructor Detail

      • TransactionalIdFactory

        public TransactionalIdFactory()
    • Method Detail

      • buildTransactionalId

        public static String buildTransactionalId​(String transactionalIdPrefix,
                                                  int subtaskId,
                                                  long checkpointOffset)
        Constructs a transactionalId with the following format transactionalIdPrefix-subtaskId-checkpointOffset.
        Parameters:
        transactionalIdPrefix - prefix for the id
        subtaskId - describing the subtask which is opening the transaction
        checkpointOffset - an always incrementing number usually capturing the number of checkpoints taken by the subtask
        Returns:
        transactionalId
      • extractSubtaskId

        public static int extractSubtaskId​(String name)
      • extractPrefix

        public static String extractPrefix​(String name)