Interface ConsumerFlowStrategy.Context

Enclosing interface:
ConsumerFlowStrategy

public static interface ConsumerFlowStrategy.Context
Chunk context.
Since:
0.12.0
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    The offset of the first message in the chunk, aka chunk ID.
    void
    credits(int credits)
    Provide credits for the subscription.
    long
    The number of messages in the chunk.
  • Method Details

    • credits

      void credits(int credits)
      Provide credits for the subscription.

      ConsumerFlowStrategy implementation should always provide 1 credit for a given chunk.

      Parameters:
      credits - the number of credits provided, usually 1
    • messageCount

      long messageCount()
      The number of messages in the chunk.
      Returns:
      number of messages in the chunk
    • chunkId

      long chunkId()
      The offset of the first message in the chunk, aka chunk ID.
      Returns:
      offset of the first message in the chunk (chunk ID)