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