Package org.springframework.kafka.core
Interface ConsumerFactory.Listener<K,V>
- Type Parameters:
K
- the key type.V
- the value type.
- All Known Implementing Classes:
MicrometerConsumerListener
- Enclosing interface:
- ConsumerFactory<K,
V>
public static interface ConsumerFactory.Listener<K,V>
Called whenever a consumer is added or removed.
- Since:
- 2.5
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
consumerAdded
(String id, org.apache.kafka.clients.consumer.Consumer<K, V> consumer) A new consumer was created.default void
consumerRemoved
(String id, org.apache.kafka.clients.consumer.Consumer<K, V> consumer) An existing consumer was removed.
-
Method Details
-
consumerAdded
A new consumer was created.- Parameters:
id
- the consumer id (factory bean name and client.id separated by a period).consumer
- the consumer.
-
consumerRemoved
An existing consumer was removed.- Parameters:
id
- the consumer id (factory bean name and client.id separated by a period).consumer
- the consumer.
-