Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
0c82698a
Commit
0c82698a
authored
May 20, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kafka消息不重复消费问题处理
parent
256e3bfb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
KafkaConsumerService.java
.../com/yeejoin/amos/message/kafka/KafkaConsumerService.java
+1
-1
application-dev.properties
...ils-message/src/main/resources/application-dev.properties
+2
-0
No files found.
amos-boot-utils/amos-boot-utils-message/src/main/java/com/yeejoin/amos/message/kafka/KafkaConsumerService.java
View file @
0c82698a
...
@@ -249,7 +249,7 @@ public class KafkaConsumerService {
...
@@ -249,7 +249,7 @@ public class KafkaConsumerService {
*
*
* @param message 消息
* @param message 消息
*/
*/
@KafkaListener
(
id
=
"consumerSingle"
,
topics
=
"#{'${kafka.topics}'.split(',')}"
,
concurrency
=
"2"
)
@KafkaListener
(
id
=
"consumerSingle"
,
groupId
=
"${kafka.station.groupId}"
,
topics
=
"#{'${kafka.topics}'.split(',')}"
,
concurrency
=
"2"
)
public
void
consumerSingle
(
String
message
,
Acknowledgment
ack
)
{
public
void
consumerSingle
(
String
message
,
Acknowledgment
ack
)
{
JSONObject
messageObj
=
JSONObject
.
fromObject
(
message
);
JSONObject
messageObj
=
JSONObject
.
fromObject
(
message
);
try
{
try
{
...
...
amos-boot-utils/amos-boot-utils-message/src/main/resources/application-dev.properties
View file @
0c82698a
...
@@ -114,3 +114,5 @@ kafka.auto-startup=false
...
@@ -114,3 +114,5 @@ kafka.auto-startup=false
#浜嬩欢鍛婅瀵规帴Kafka涓婚
#浜嬩欢鍛婅瀵规帴Kafka涓婚
queue.kafka.eventAlarm.topics
=
JKXT2BP-GJ-Topic-site
queue.kafka.eventAlarm.topics
=
JKXT2BP-GJ-Topic-site
kafka.station.groupId
=
shaoxing
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