Interface KafkaConsumerService

All Superinterfaces:
AutoCloseable, Closeable

public interface KafkaConsumerService extends Closeable
Kafka Consumer Service must be closed to avoid leaking connection resources
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    commit(PollingSummary pollingSummary)
    Commit record information to Kafka Brokers
    Get Partition State information for subscription
    boolean
     
    Poll Subscriptions for Records
    void
    Rolls back the offsets of the records so that any records that have been polled since the last commit are re-polled

    Methods inherited from interface java.io.Closeable

    close
  • Method Details

    • commit

      void commit(PollingSummary pollingSummary)
      Commit record information to Kafka Brokers
      Parameters:
      pollingSummary - Polling Summary information to be committed
    • rollback

      void rollback()
      Rolls back the offsets of the records so that any records that have been polled since the last commit are re-polled
    • isClosed

      boolean isClosed()
      Returns:
      true if the service is closed; false otherwise
    • poll

      Poll Subscriptions for Records
      Returns:
      Stream of Records or empty when none returned
    • getPartitionStates

      List<PartitionState> getPartitionStates()
      Get Partition State information for subscription
      Returns:
      List of Partition State information