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 . |
default void |
onMessage(T data,
org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
Invoked with data from kafka and provides access to the
Consumer . |
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
. 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
. The
default implementation throws UnsupportedOperationException
.data
- the data to be processed.acknowledgment
- the acknowledgment.consumer
- the consumer.