Interface SubscriptionControl

All Known Implementing Classes:
WrappedSubscriptionControl

public interface SubscriptionControl
  • Method Details

    • acknowledge

      void acknowledge(Partition partition)
      Only with manual offsets.

      Notify the subscription that user already process the partition and can be include in next [checkpoint] call.

    • checkpoint

      CompletionStage<org.apache.pekko.Done> checkpoint()
      Only with manual offsets.

      Persist in server the offset for all [acknowledge] partitions for current groupName

    • getKafkaMetrics

      CompletionStage<scala.collection.immutable.Map<String,String>> getKafkaMetrics(scala.collection.immutable.List<String> metricNames)
      Exposes Kafka consumer metrics.

      A specific list of Kafka metric name Strings can be specified in metricNames. If there is no argument passed (or the list is empty), then all available Kafka consumer metrics will be retrieved. Only the metric name should be specified (without including the group), for example "time-between-poll-avg" or "records-consumed-rate".

      In the Kafka consumer metrics returned, the client-id value will be taken from the consumerId field in ConsumerSettings, which can be set to a specified value (if it is not set, then by default a random UUID will be assigned as client-id).

    • shutdown

      CompletionStage<org.apache.pekko.Done> shutdown()
      Shutdown the stream. It will wait for outstanding processes to finish before shutting down.