Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
ad8223e0
Commit
ad8223e0
authored
Jul 12, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加前端页面
parent
c48cc6c7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
common-lib/src/main/java/com/mortals/xhx/queue/rabbitmq/TbRabbitMqConsumerTemplate.java
...ortals/xhx/queue/rabbitmq/TbRabbitMqConsumerTemplate.java
+6
-2
device-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
.../java/com/mortals/httpclient/device/DeviceController.http
+1
-1
No files found.
common-lib/src/main/java/com/mortals/xhx/queue/rabbitmq/TbRabbitMqConsumerTemplate.java
View file @
ad8223e0
...
...
@@ -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
());
...
...
device-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
View file @
ad8223e0
...
...
@@ -136,7 +136,7 @@ Content-Type: application/json
Authorization: {{authToken}}
{
"deviceCode": "a10
1
",
"deviceCode": "a10
2
",
"action": "upload"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment