Commit ad8223e0 authored by 赵啸非's avatar 赵啸非

添加前端页面

parent c48cc6c7
......@@ -47,19 +47,23 @@ public class TbRabbitMqConsumerTemplate<T extends TbQueueMsg> extends AbstractTb
stopped = false;
}
@SneakyThrows
@Override
protected List<GetResponse> doPoll(long durationInMillis) {
List<GetResponse> result = queues.stream()
.map(queue -> {
try {
AMQP.Queue.DeclareOk declareOk = channel.queueDeclarePassive(queue);
//AMQP.Queue.DeclareOk declareOk = channel.queueDeclarePassive(queue);
//log.info("declareOk:{}",JSON.toJSONString(declareOk));
GetResponse getResponse = channel.basicGet(queue, true);
return getResponse;
} catch (IOException e) {
log.error("Failed to get messages from queue: {},{}" , queue,e);
try {
channel = connection.createChannel();
} catch (IOException ioException) {
ioException.printStackTrace();
}
return null;
}
}).filter(Objects::nonNull).collect(Collectors.toList());
......
......@@ -136,7 +136,7 @@ Content-Type: application/json
Authorization: {{authToken}}
{
"deviceCode": "a101",
"deviceCode": "a102",
"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