| 程序包 | 说明 |
|---|---|
| com.aliyun.datahub.clientlibrary.config | |
| com.aliyun.datahub.clientlibrary.consumer | |
| com.aliyun.datahub.clientlibrary.interceptor |
| 限定符和类型 | 方法和说明 |
|---|---|
ConsumerConfig |
ConsumerConfig.setAutoCommit(boolean autoCommit) |
ConsumerConfig |
ConsumerConfig.setClientProvider(ClientProvider clientProvider) |
ConsumerConfig |
ConsumerConfig.setCodecConcurrentNum(int codecConcurrentNum) |
ConsumerConfig |
ConsumerConfig.setEnableBinary(boolean enableBinary) |
ConsumerConfig |
ConsumerConfig.setFetchLatestDelayMs(long fetchLatestDelayMs) |
ConsumerConfig |
ConsumerConfig.setFetchSize(int fetchSize) |
ConsumerConfig |
ConsumerConfig.setMaxBufferSize(int maxBufferSize) |
ConsumerConfig |
ConsumerConfig.setMaxShardReaderPoolSize(int maxShardReaderPoolSize) |
ConsumerConfig |
ConsumerConfig.setOffsetCommitTimeoutMs(long offsetCommitTimeoutMs) |
ConsumerConfig |
ConsumerConfig.setSessionTimeoutMs(long sessionTimeoutMs) |
ConsumerConfig |
ConsumerConfig.setShardReadEndCallback(ShardReadEndCallback shardReadEndCallback) |
ConsumerConfig |
ConsumerConfig.setUserAgent(String userAgent) |
| 构造器和说明 |
|---|
Consumer(String projectName,
String topicName,
String subId,
ConsumerConfig config)
Mode : Collaborative Consumption
Auto assign shards : Y
Use offset service : Y
Perceive offset reset : Throw exception within commit interval
|
Consumer(String projectName,
String topicName,
String subId,
List<String> shardIds,
ConsumerConfig config)
Mode : Manually assign shards
Auto assign shards : N
Use offset service : Y
Perceive offset reset : Throw exception within commit interval
|
Consumer(String projectName,
String topicName,
String subId,
Map<String,Offset> offsetMap,
ConsumerConfig config)
Mode : Manually assign shards and offsets
Auto assign shards : N
Use offset service : Only for display (use local offset and just commit to server)
Perceive offset reset : Throw exception within commit interval
|
ShardGroupReader(String projectName,
String topicName,
ConsumerConfig config)
Shard group reader can dynamically change the shard plan to read
|
| 构造器和说明 |
|---|
ReadInterceptorBuilder(ConsumerConfig config) |
Copyright © 2020 Alibaba Cloud Computing. All rights reserved.