public interface TConsumer<V> extends AutoCloseable
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
commitAsync() |
void |
commitAsync(OffsetCommitCallback callback) |
void |
commitSync() |
ConsumerRecords<V> |
poll(Duration timeout) |
void |
subscribe(Collection<String> topics) |
Set<String> |
subscription() |
void |
unsubscribe() |
void subscribe(Collection<String> topics) throws SQLException
SQLExceptionvoid unsubscribe()
throws SQLException
SQLExceptionSet<String> subscription() throws SQLException
SQLExceptionConsumerRecords<V> poll(Duration timeout) throws SQLException
SQLExceptionvoid commitAsync()
void commitAsync(OffsetCommitCallback callback)
void commitSync()
throws SQLException
SQLExceptionvoid close()
throws SQLException
close 在接口中 AutoCloseableSQLExceptionCopyright © 2022. All rights reserved.