Interface PartitionManager

    • Method Detail

      • lockPartitions

        Optional<Lock> lockPartitions​(String eventName,
                                      List<Partition> partitions,
                                      String lockedBy)
        Locks partitions for one event. When running consumers on multiple nodes they should try to lock partitions so that events are only processed by one consumer.
        Parameters:
        eventName - Name of the event
        partitions - The partitions to lock
        lockedBy - Name of one node of the consuming application
        Returns:
        A Lock instance containing the list of locked partitions if locking succeeded, Optional.empty() otherwise