public class TaosConsumer<V> extends Object implements TConsumer<V>
| 构造器和说明 |
|---|
TaosConsumer(Properties properties)
Note: after creating a
TaosConsumer you must always close()
it to avoid resource leaks. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
commitAsync() |
void |
commitAsync(OffsetCommitCallback callback) |
void |
commitCallbackHandler(int code) |
void |
commitSync() |
ConsumerRecords<V> |
poll(Duration timeout) |
void |
subscribe(Collection<String> topics) |
Set<String> |
subscription() |
void |
unsubscribe() |
public TaosConsumer(Properties properties) throws SQLException
TaosConsumer you must always close()
it to avoid resource leaks.SQLExceptionpublic void commitCallbackHandler(int code)
public void subscribe(Collection<String> topics) throws SQLException
subscribe 在接口中 TConsumer<V>SQLExceptionpublic void unsubscribe()
throws SQLException
unsubscribe 在接口中 TConsumer<V>SQLExceptionpublic Set<String> subscription() throws SQLException
subscription 在接口中 TConsumer<V>SQLExceptionpublic ConsumerRecords<V> poll(Duration timeout) throws SQLException
poll 在接口中 TConsumer<V>SQLExceptionpublic void commitAsync()
commitAsync 在接口中 TConsumer<V>public void commitAsync(OffsetCommitCallback callback)
commitAsync 在接口中 TConsumer<V>public void commitSync()
throws SQLException
commitSync 在接口中 TConsumer<V>SQLExceptionpublic void close()
throws SQLException
close 在接口中 TConsumer<V>close 在接口中 AutoCloseableSQLExceptionCopyright © 2022. All rights reserved.