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

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void producerAdded​(java.lang.String id, org.apache.kafka.clients.producer.Producer<K,​V> producer)
      A new producer was created.
      default void producerRemoved​(java.lang.String id, org.apache.kafka.clients.producer.Producer<K,​V> producer)
      An exsting producer was removed.
    • Method Detail

      • producerAdded

        default void producerAdded​(java.lang.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​(java.lang.String id,
                                     org.apache.kafka.clients.producer.Producer<K,​V> producer)
        An exsting producer was removed.
        Parameters:
        id - the producer id (factory bean name and client.id separated by a period).
        producer - the producer.