Interface MessageBatch<T>

  • Type Parameters:
    T -

    @Public
    @Stable
    public interface MessageBatch<T>
    Interface wrapping stream consumer. Throws IndexOutOfBoundsException when trying to access a message at an invalid index.
    • Method Detail

      • getMessageCount

        int getMessageCount()
        Returns:
        number of available messages
      • getUnfilteredMessageCount

        default int getUnfilteredMessageCount()
        Returns:
        number of messages returned from the stream
      • getMessageAtIndex

        @Deprecated
        T getMessageAtIndex​(int index)
        Deprecated.
        Returns the message at a particular index inside a set of messages returned from the stream.
        Parameters:
        index -
        Returns:
      • getMessageBytesAtIndex

        default byte[] getMessageBytesAtIndex​(int index)
      • getStreamMessage

        default StreamMessage<T> getStreamMessage​(int index)
      • getMessageOffsetAtIndex

        int getMessageOffsetAtIndex​(int index)
        Returns the offset of the message at a particular index inside a set of messages returned from the stream.
        Parameters:
        index -
        Returns:
      • getMessageLengthAtIndex

        int getMessageLengthAtIndex​(int index)
        Returns the length of the message at a particular index inside a set of messages returned from the stream.
        Parameters:
        index -
        Returns:
      • getMetadataAtIndex

        default RowMetadata getMetadataAtIndex​(int index)
        Returns the metadata associated with the message at a particular index. This typically includes the timestamp when the message was ingested by the upstream stream-provider and other relevant metadata.
      • getNextStreamMessageOffsetAtIndex

        @Deprecated
        long getNextStreamMessageOffsetAtIndex​(int index)
        Deprecated.
        Returns the offset of the next message.
        Parameters:
        index -
        Returns:
      • getNextStreamPartitionMsgOffsetAtIndex

        default StreamPartitionMsgOffset getNextStreamPartitionMsgOffsetAtIndex​(int index)
        Returns the offset of the next message.
        Parameters:
        index -
        Returns:
      • isEndOfPartitionGroup

        default boolean isEndOfPartitionGroup()
        Returns true if end of the consumer detects that no more records can be read from this partition group for good