Interface SubscriptionListener.SubscriptionContext

Enclosing interface:
SubscriptionListener

public static interface SubscriptionListener.SubscriptionContext
Context object for the subscription.
  • Method Details

    • offsetSpecification

      OffsetSpecification offsetSpecification()
      The offset specification computed by the library.

      If the consumer has no name, the value is the value set with ConsumerBuilder.offset(OffsetSpecification) on the first subscription and the offset of the last dispatched message on subsequent calls (e.g. when the client re-subscribes after a disconnection).

      If the consumer has a name, the value is the last stored if any.

      Returns:
      the computed offset specification
      See Also:
    • offsetSpecification

      void offsetSpecification(OffsetSpecification offsetSpecification)
      Set the offset specification to use for the subscription.

      It overrides the value computed by the client.

      Parameters:
      offsetSpecification - the offset specification to use
    • stream

      String stream()
      The stream involved.
      Returns:
      the stream