Interface SubscriptionControl
- All Known Implementing Classes:
WrappedSubscriptionControl
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledge(Partition partition) Only with manual offsets.CompletionStage<org.apache.pekko.Done>Only with manual offsets.CompletionStage<scala.collection.immutable.Map<String,String>> getKafkaMetrics(scala.collection.immutable.List<String> metricNames) Exposes Kafka consumer metrics.CompletionStage<org.apache.pekko.Done>shutdown()Shutdown the stream.
-
Method Details
-
acknowledge
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-idvalue will be taken from theconsumerIdfield inConsumerSettings, which can be set to a specified value (if it is not set, then by default a random UUID will be assigned asclient-id). -
shutdown
CompletionStage<org.apache.pekko.Done> shutdown()Shutdown the stream. It will wait for outstanding processes to finish before shutting down.
-