Interface Messages<T>

Type Parameters:
T - the type of the deserialized message value
All Superinterfaces:
Iterable<Message<T>>

public interface Messages<T> extends Iterable<Message<T>>
A batch of messages received from a consumer.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The number of messages in this batch.
    The last message id in this batch.

    Methods inherited from interface java.lang.Iterable

    forEach, iterator, spliterator
  • Method Details

    • count

      int count()
      The number of messages in this batch.
      Returns:
      the number of messages in this batch
    • lastId

      MessageId lastId()
      The last message id in this batch.
      Returns:
      the MessageId of the last message in this batch