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
1379d53a
Commit
1379d53a
authored
Jul 14, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备列表导出优化
parent
9cf1f581
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
7 deletions
+5
-7
common-lib/src/main/java/com/mortals/xhx/queue/DefaultTbCoreConsumerService.java
...a/com/mortals/xhx/queue/DefaultTbCoreConsumerService.java
+0
-2
common-lib/src/main/java/com/mortals/xhx/queue/kafka/AbstractTbQueueConsumerTemplate.java
...tals/xhx/queue/kafka/AbstractTbQueueConsumerTemplate.java
+1
-1
common-lib/src/main/java/com/mortals/xhx/queue/rabbitmq/TbRabbitMqConsumerTemplate.java
...ortals/xhx/queue/rabbitmq/TbRabbitMqConsumerTemplate.java
+3
-3
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/DefaultTbCoreConsumerService.java
View file @
1379d53a
...
...
@@ -38,8 +38,6 @@ public class DefaultTbCoreConsumerService extends AbstractConsumerService<TbQueu
public
DefaultTbCoreConsumerService
(
TbCoreQueueFactory
tbCoreQueueFactory
)
{
//通过工厂类创建通道
this
.
mainConsumer
=
tbCoreQueueFactory
.
createMsgConsumer
();
//tbCoreQueueFactory.createListMsgConsumer()
}
@PostConstruct
...
...
common-lib/src/main/java/com/mortals/xhx/queue/kafka/AbstractTbQueueConsumerTemplate.java
View file @
1379d53a
...
...
@@ -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
;
...
...
common-lib/src/main/java/com/mortals/xhx/queue/rabbitmq/TbRabbitMqConsumerTemplate.java
View file @
1379d53a
...
...
@@ -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
...
...
device-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
View file @
1379d53a
...
...
@@ -136,7 +136,7 @@ Content-Type: application/json
Authorization: {{authToken}}
{
"deviceCode": "B0
1
",
"deviceCode": "B0
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