Class KafkaHelper
java.lang.Object
org.sdase.commons.server.kafka.consumer.KafkaHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> String getClientId
(org.apache.kafka.clients.consumer.KafkaConsumer<K, V> consumer) static <K,
V> String getClientId
(org.apache.kafka.clients.producer.Producer<K, V> producer)
-
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 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
- 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
-