Class KafkaHelper

java.lang.Object
org.sdase.commons.server.kafka.consumer.KafkaHelper

public class KafkaHelper extends Object
  • Method Details

    • getClientId

      public static <K, V> String getClientId(org.apache.kafka.clients.consumer.KafkaConsumer<K,V> consumer)
      Type Parameters:
      K - the type of the Key
      V - the type of the Value
      Parameters:
      consumer - the Kafka consumer
      Returns:
      the name of the consumer as used in log messages that is hidden within the metrics
    • getClientId

      public static <K, V> String getClientId(org.apache.kafka.clients.producer.Producer<K,V> producer)
      Type Parameters:
      K - the type of the Key
      V - the type of the Value
      Parameters:
      producer - the Kafka producer
      Returns:
      the name of the producer as used in log messages that is hidden within the metrics