K - The key typeV - The value typepublic interface ConsumerAware<K,V>
KafkaListener instances to implement
if they wish to obtain a reference to the underlying Consumer.
Modification of received Consumer instances (e.g. modifying subscriptions) is possible ONLY
when run by the Thread driving KafkaConsumer's poll loop! Otherwise you will receive ConcurrentModificationException, cause KafkaConsumer instances are not safe for
multi-threaded access!
| Modifier and Type | Method and Description |
|---|---|
void |
setKafkaConsumer(org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
Called when the underlying
Consumer is created. |