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

设备列表导出优化

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