public class Producer extends Object
| 构造器和说明 |
|---|
Producer(String projectName,
String topicName,
List<String> shardIds,
ProducerConfig config)
Producer with shards specified
|
Producer(String projectName,
String topicName,
ProducerConfig config)
Producer perceiving shard change
|
public Producer(String projectName, String topicName, ProducerConfig config)
projectName - The name of project.topicName - The name of topic.config - The producer config.public Producer(String projectName, String topicName, List<String> shardIds, ProducerConfig config)
projectName - The name of project.topicName - The name of topic.shardIds - The shard ids.config - The producer config.public void send(List<com.aliyun.datahub.client.model.RecordEntry> records, int maxRetry)
records - The record list to send.maxRetry - The max retry times.public void send(List<com.aliyun.datahub.client.model.RecordEntry> records, String shardId, int maxRetry)
records - The record list to send.shardId - The specific shard id.maxRetry - The max retry times.public void close()
Copyright © 2020 Alibaba Cloud Computing. All rights reserved.