@InterfaceAudience.Public @InterfaceStability.Stable public interface ReaderListener<T> extends Serializable
| Modifier and Type | Method and Description |
|---|---|
default void |
reachedEndOfTopic(Reader<T> reader)
Get the notification when a topic is terminated.
|
void |
received(Reader<T> reader,
Message<T> msg)
This method is called whenever a new message is received.
|
void received(Reader<T> reader, Message<T> msg)
Messages are guaranteed to be delivered in order and from the same thread for a single consumer
This method will only be called once for each message, unless either application or broker crashes.
Application is responsible of handling any exception that could be thrown while processing the message.
reader - the Reader object from where the message was receivedmsg - the message objectCopyright © 2017–2021 Apache Software Foundation. All rights reserved.