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 Type
    Method
    Description
    default 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

      default void producerAdded(String id, org.apache.kafka.clients.producer.Producer<K,V> producer)
      A new producer was created.
      Parameters:
      id - the producer id (factory bean name and client.id separated by a period).
      producer - the producer.
    • producerRemoved

      default void producerRemoved(String id, org.apache.kafka.clients.producer.Producer<K,V> producer)
      An existing producer was removed.
      Parameters:
      id - the producer id (factory bean name and client.id separated by a period).
      producer - the producer.