当前位置:网站首页>How to ensure reliable delivery of messages?
How to ensure reliable delivery of messages?
2022-06-11 02:57:00 【ambition_ forever】
1、 Production stage :
Ensure through request confirmation mechanism , That is, the producer sends messages Broker in the future ,Broker After successfully receiving the message , Send back ACK Confirm that the producer , The generator receives Broker Sent ACK After the confirmation , It is considered that the consumption has been successfully sent . If you don't receive it for a long time ACK, The producer will try again , Or throw an exception to the user .
2、 Storage phase :
The storage phase is as long as Broker In normal operation , There will be no lost messages . But if Broker There's a problem , For example, the process is dead or the server is down , Or you may lose messages .
If it's a single instance Broker Transformation of , You can set the synchronous brush disk , That is, when you return ACK Before Broker First write the message to disk , Prevent messages from being lost because the server is unavailable , You can get data from the disk the next time you restart .
If more than one Broker The clustering pattern composed of instances , At least two sets shall be set Broker Received producer message , To send ACK confirm .
3、 Consumption stage :
The consumption phase uses a similar approach to the production phase to ensure that messages are not lost ,Consumer from Broker After pulling the news , After successfully executing the business logic , Will give Broker Send consumption confirmation ACK. If Broker No confirmation of consumption has been received ACK Transformation of , The next time Consumer The same message will be returned when the message is pulled , Ensure that messages are not lost during network transmission , It won't be because of Consumer Loss due to error in executing business logic .

边栏推荐
- 怎样确保消息的可靠性投递?
- Recent learning and update plan
- How to use phpMyAdmin to optimize MySQL database
- Flat data to tree and tree data flattening
- Byte beating | the first batch of written examination for game R & D post (question solution)
- helm 部署traefik ingress
- 2022年熔化焊接与热切割操作证考试题库及答案
- Flink开发环境搭建及WordCount
- Databinding escaping with presentation symbols
- A digit DP
猜你喜欢

怎样简洁明了地说清楚产品需求?

基于互联网架构演进, 构建秒杀系统
![[MySQL 45 lecture -12] lecture 12 the reason why MySQL has a wind attack from time to time](/img/db/aeadbc4f3189a9809592d2a4714d22.jpg)
[MySQL 45 lecture -12] lecture 12 the reason why MySQL has a wind attack from time to time

CPT 102_LEC 17

同一个用户的两次请求SessionId竟然不一致-----记录问题

Android P SoftAP start process

Helm deploy traifik ingress

Rs232/rs485 to 4G DTU uploading temperature and humidity sensor data based on Modbus protocol to remote TCP server

Manon's advanced road - Daily anecdotes

Will your company choose to develop data center?
随机推荐
The two request sessionids of the same user are inconsistent ----- record the problem
Explication du cours de graphacademy: neo4j Graph Data Science Foundation
OpenJudge NOI 1.13 18:Tomorrow never knows?
码农的进阶之路 | 每日趣闻
Flink开发环境搭建及WordCount
Forest v1.5.22 发布!支持Kotlin
error exepected identifier before ‘(‘ token, grpc 枚举类编译错误
微信小程序
Write my Ini configuration file error
CPT 102_LEC 17
[resolved] how to fix another update in progress WordPress upgrade error
CPT 102_ LEC 18
Introduction to the functions of today's headline search webmaster platform (portal)
Young people fleeing big cities: shouldering housing prices and pressure, but not epidemics
CPT 102_LEC 13-14
WordPress article directory plug-in luckywp table of contents setup tutorial
AOSP ~ modify default volume
cmake常用命令
Explanation of spark common parameters
Helm deploy traifik ingress