public class TaosConsumer<V> extends Object implements AutoCloseable
| Constructor and Description |
|---|
TaosConsumer(Properties properties)
Note: after creating a
TaosConsumer you must always close()
it to avoid resource leaks. |
public TaosConsumer(Properties properties) throws SQLException
TaosConsumer you must always close()
it to avoid resource leaks.SQLExceptionpublic void subscribe(Collection<String> topics) throws SQLException
SQLExceptionpublic void unsubscribe()
throws SQLException
SQLExceptionpublic Set<String> subscription() throws SQLException
SQLExceptionpublic ConsumerRecords<V> poll(Duration timeout) throws SQLException
SQLException@Deprecated public void commitCallbackHandler(int code)
code - error codepublic void commitAsync()
throws SQLException
SQLExceptionpublic void commitAsync(OffsetCommitCallback<V> callback) throws SQLException
SQLExceptionpublic void commitAsync(Map<TopicPartition,OffsetAndMetadata> offsets, OffsetCommitCallback<V> callback) throws SQLException
SQLExceptionpublic void commitSync()
throws SQLException
SQLExceptionpublic void commitSync(Map<TopicPartition,OffsetAndMetadata> offsets) throws SQLException
SQLExceptionpublic void seek(TopicPartition partition, long offset) throws SQLException
SQLExceptionpublic long position(TopicPartition tp) throws SQLException
SQLExceptionpublic Map<TopicPartition,Long> position(String topic) throws SQLException
SQLExceptionpublic Map<TopicPartition,Long> beginningOffsets(String topic) throws SQLException
SQLExceptionpublic Map<TopicPartition,Long> endOffsets(String topic) throws SQLException
SQLExceptionpublic void seekToBeginning(Collection<TopicPartition> partitions) throws SQLException
SQLExceptionpublic void seekToEnd(Collection<TopicPartition> partitions) throws SQLException
SQLExceptionpublic Set<TopicPartition> assignment() throws SQLException
SQLExceptionpublic OffsetAndMetadata committed(TopicPartition partition) throws SQLException
SQLExceptionpublic Map<TopicPartition,OffsetAndMetadata> committed(Set<TopicPartition> partitions) throws SQLException
SQLExceptionpublic void close()
throws SQLException
close in interface AutoCloseableSQLExceptionCopyright © 2025. All rights reserved.