Commit 1379d53a authored by 赵啸非's avatar 赵啸非

设备列表导出优化

parent 9cf1f581
......@@ -38,8 +38,6 @@ public class DefaultTbCoreConsumerService extends AbstractConsumerService<TbQueu
public DefaultTbCoreConsumerService(TbCoreQueueFactory tbCoreQueueFactory) {
//通过工厂类创建通道
this.mainConsumer = tbCoreQueueFactory.createMsgConsumer();
//tbCoreQueueFactory.createListMsgConsumer()
}
@PostConstruct
......
......@@ -50,7 +50,7 @@ public abstract class AbstractTbQueueConsumerTemplate<R, T extends TbQueueMsg> i
@Override
public void subscribe(Set<TopicPartitionInfo> partitions) {
log.info("订阅的topics {} ", JSON.toJSONString(partitions));
// log.info("订阅的topics {} ", JSON.toJSONString(partitions));
if (stopped) {
log.error("订阅服务已停止,topic {}", topic);
return;
......
......@@ -38,7 +38,7 @@ public class TbRabbitMqConsumerTemplate<T extends TbQueueMsg> extends AbstractTb
*/
private TbRabbitMqSettings rabbitMqSettings;
private volatile Set<String> queues;
private volatile Set<String> queues=new HashSet<>();
public TbRabbitMqConsumerTemplate(TbRabbitMqSettings rabbitMqSettings, String topic, TbQueueMsgDecoder<T> decoder) {
super(topic);
......@@ -56,7 +56,7 @@ public class TbRabbitMqConsumerTemplate<T extends TbQueueMsg> extends AbstractTb
@Override
protected List<GetResponse> doPoll(long durationInMillis) {
log.info("queues:{}",JSON.toJSONString(queues));
List<GetResponse> result = queues.stream()
.map(queue -> {
try {
......@@ -93,7 +93,7 @@ public class TbRabbitMqConsumerTemplate<T extends TbQueueMsg> extends AbstractTb
// queues = partitions.stream()
// .map(TopicPartitionInfo::getFullTopicName)
// .collect(Collectors.toSet());
log.info("doSubscribe:{}", JSON.toJSONString(queues));
log.info("doSubscribe:{},topicNames:{}", JSON.toJSONString(queues), JSON.toJSONString(queues));
}
@Override
......
......@@ -136,7 +136,7 @@ Content-Type: application/json
Authorization: {{authToken}}
{
"deviceCode": "B01",
"deviceCode": "B02",
"action": "upload"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment