Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
log-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
赵啸非
log-platform
Commits
e7f2c60a
Commit
e7f2c60a
authored
Aug 26, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常日志前端展示添加
parent
6f794689
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
log-manager/src/main/java/com/mortals/xhx/base/framework/listener/AccessMessageConsumerListener.java
...ase/framework/listener/AccessMessageConsumerListener.java
+13
-2
No files found.
log-manager/src/main/java/com/mortals/xhx/base/framework/listener/AccessMessageConsumerListener.java
View file @
e7f2c60a
...
...
@@ -37,14 +37,25 @@ import java.util.stream.Collectors;
**/
@Slf4j
@Component
@RabbitListener
(
queues
=
QueueKey
.
ACCESS_LOG_QUEUE
,
containerFactory
=
"consumerBatchContainerFactory"
)
//@RabbitListener(queues = QueueKey.ACCESS_LOG_QUEUE,
// containerFactory = "consumerBatchContainerFactory")
@RabbitListener
(
queues
=
QueueKey
.
ACCESS_LOG_QUEUE
)
public
class
AccessMessageConsumerListener
{
@Autowired
private
AccessLogService
accessLogService
;
@RabbitHandler
public
void
onMessage
(
AccessLogEntity
entity
)
throws
Exception
{
log
.
info
(
"[Access onMessage single]"
);
entity
.
setId
(
IdUtil
.
getSnowflake
(
0
,
1
).
nextId
());
entity
.
setCreateUserId
(
1L
);
entity
.
setCreateTime
(
new
Date
());
accessLogService
.
save
(
entity
,
null
);
}
//@RabbitHandler
public
void
onMessage
(
@Payload
List
<
String
>
messages
)
throws
Exception
{
log
.
info
(
"[Access onMessage][线程编号:{} 消息数量:{}]"
,
Thread
.
currentThread
().
getName
()
+
Thread
.
currentThread
().
getId
(),
messages
.
size
());
...
...
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