Interface KafkaConsumerService
- All Superinterfaces:
AutoCloseable
,Closeable
Kafka Consumer Service must be closed to avoid leaking connection resources
-
Method Summary
Modifier and TypeMethodDescriptionvoid
commit
(PollingSummary pollingSummary) Commit record information to Kafka BrokersGet Partition State information for subscriptionboolean
isClosed()
poll()
Poll Subscriptions for Recordsvoid
rollback()
Rolls back the offsets of the records so that any records that have been polled since the last commit are re-polled
-
Method Details
-
commit
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
Iterable<ByteRecord> 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
-