T - the type received by the listener.@FunctionalInterface
public interface GenericMessageListener<T>
| Modifier and Type | Method and Description |
|---|---|
void |
onMessage(T data)
Invoked with data from kafka.
|
default void |
onMessage(T data,
Acknowledgment acknowledgment)
Invoked with data from kafka.
|
default void |
onMessage(T data,
Acknowledgment acknowledgment,
org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
Invoked with data from kafka and provides access to the
Consumer
for operations such as pause/resume. |
default void |
onMessage(T data,
org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
Invoked with data from kafka and provides access to the
Consumer
for operations such as pause/resume. |
void onMessage(T data)
data - the data to be processed.default void onMessage(T data, Acknowledgment acknowledgment)
UnsupportedOperationException.data - the data to be processed.acknowledgment - the acknowledgment.default void onMessage(T data, org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
Consumer
for operations such as pause/resume. Invoked with null data when a poll
returns no data (enabling resume). The default implementation throws
UnsupportedOperationException.data - the data to be processed.consumer - the consumer.default void onMessage(T data, Acknowledgment acknowledgment, org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
Consumer
for operations such as pause/resume. Invoked with null data when a poll
returns no data (enabling resume). The default implementation throws
UnsupportedOperationException.data - the data to be processed.acknowledgment - the acknowledgment.consumer - the consumer.