Interface ConsumerAwareRebalanceListener
-
- All Superinterfaces:
org.apache.kafka.clients.consumer.ConsumerRebalanceListener
public interface ConsumerAwareRebalanceListener extends org.apache.kafka.clients.consumer.ConsumerRebalanceListener
A rebalance listener that provides access to the consumer object. Starting with version 2.1.5, as a convenience, default no-op implementations are provided for all methods, allowing the user to implement just those (s)he is interested in.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description static org.springframework.core.log.LogAccessor
LOGGER
LogAccessor
for use in default methods.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
onPartitionsAssigned(java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
default void
onPartitionsAssigned(org.apache.kafka.clients.consumer.Consumer<?,?> consumer, java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
The same asonPartitionsAssigned(Collection)
with the additional consumer parameter.default void
onPartitionsLost(java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
default void
onPartitionsLost(org.apache.kafka.clients.consumer.Consumer<?,?> consumer, java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
The same asonPartitionsLost(Collection)
with an additional consumer parameter.default void
onPartitionsRevoked(java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
default void
onPartitionsRevokedAfterCommit(org.apache.kafka.clients.consumer.Consumer<?,?> consumer, java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
The same asonPartitionsRevoked(Collection)
with the additional consumer parameter.default void
onPartitionsRevokedBeforeCommit(org.apache.kafka.clients.consumer.Consumer<?,?> consumer, java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
The same asonPartitionsRevoked(Collection)
with the additional consumer parameter.
-
-
-
Method Detail
-
onPartitionsRevokedBeforeCommit
default void onPartitionsRevokedBeforeCommit(org.apache.kafka.clients.consumer.Consumer<?,?> consumer, java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
The same asonPartitionsRevoked(Collection)
with the additional consumer parameter. It is invoked by the container before any pending offsets are committed.- Parameters:
consumer
- the consumer.partitions
- the partitions.
-
onPartitionsRevokedAfterCommit
default void onPartitionsRevokedAfterCommit(org.apache.kafka.clients.consumer.Consumer<?,?> consumer, java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
The same asonPartitionsRevoked(Collection)
with the additional consumer parameter. It is invoked by the container after any pending offsets are committed.- Parameters:
consumer
- the consumer.partitions
- the partitions.
-
onPartitionsLost
default void onPartitionsLost(org.apache.kafka.clients.consumer.Consumer<?,?> consumer, java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
The same asonPartitionsLost(Collection)
with an additional consumer parameter.- Parameters:
consumer
- the consumer.partitions
- the partitions.- Since:
- 2.4
-
onPartitionsAssigned
default void onPartitionsAssigned(org.apache.kafka.clients.consumer.Consumer<?,?> consumer, java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
The same asonPartitionsAssigned(Collection)
with the additional consumer parameter.- Parameters:
consumer
- the consumer.partitions
- the partitions.
-
onPartitionsRevoked
default void onPartitionsRevoked(java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
- Specified by:
onPartitionsRevoked
in interfaceorg.apache.kafka.clients.consumer.ConsumerRebalanceListener
-
onPartitionsAssigned
default void onPartitionsAssigned(java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
- Specified by:
onPartitionsAssigned
in interfaceorg.apache.kafka.clients.consumer.ConsumerRebalanceListener
-
onPartitionsLost
default void onPartitionsLost(java.util.Collection<org.apache.kafka.common.TopicPartition> partitions)
- Specified by:
onPartitionsLost
in interfaceorg.apache.kafka.clients.consumer.ConsumerRebalanceListener
-
-