Class KafkaHelper
- java.lang.Object
-
- org.sdase.commons.server.kafka.consumer.KafkaHelper
-
public class KafkaHelper extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K,V>
java.lang.StringgetClientId(org.apache.kafka.clients.consumer.KafkaConsumer<K,V> consumer)
static <K,V>
java.lang.StringgetClientId(org.apache.kafka.clients.producer.Producer<K,V> producer)
-
-
-
Method Detail
-
getClientId
public static <K,V> java.lang.String getClientId(org.apache.kafka.clients.consumer.KafkaConsumer<K,V> consumer)
- Type Parameters:
K
- the type of the KeyV
- 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> java.lang.String getClientId(org.apache.kafka.clients.producer.Producer<K,V> producer)
- Type Parameters:
K
- the type of the KeyV
- 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
-
-