当前位置:网站首页>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 .

边栏推荐
- How can Delma's own brand "take off" when Philips is listed on the market?
- 数组全全排列
- Manon's advanced road - Daily anecdotes
- Graphacademy course explanation: Fundamentals of neo4j graph data science
- Databinding escaping with presentation symbols
- CPT 102_LEC 17
- js 内存泄漏
- 弄懂了采矿业与碳中和的逻辑,就读懂了矿区无人驾驶的千亿市场
- 【冒泡排序的实现】
- 第七章 常用的协议简介(1)
猜你喜欢

RS232/RS485转4G DTU 上传基于Modbus协议的温湿度传感器数据到远程TCP服务器

Manon's advanced road - Daily anecdotes

Uni app - one click access to user information

Arduino使用NRF24L01模块进行无线通信

Write my Ini configuration file error

Application of the remote acquisition IOT gateway of the Bashir trough flowmeter in open channel flow monitoring
![[big guy show] aiops in the eyes of Borui data, choosing the right track and the right people](/img/a6/61d125326fc81532a56858c384460f.jpg)
[big guy show] aiops in the eyes of Borui data, choosing the right track and the right people

Live broadcast! Feature matching of orb-slam3 series (mlpnp, word bag model, etc.).

Why did those who left Beijing, Shanghai and Guangzhou with a smile cry in the end?

逃离大城市的年轻人:扛住了房价和压力,没扛住流行病
随机推荐
靠贴牌飞利浦冲击上市,德尔玛的自有品牌又该如何“起跳”?
Net core Tianma XingKong series - Interface Implementation for dependency injection and mutual conversion of database tables and C entity classes
The two request sessionids of the same user are inconsistent ----- record the problem
net core天马行空系列-可用于依赖注入的,数据库表和c#实体类互相转换的接口实现
How can Delma's own brand "take off" when Philips is listed on the market?
[implementation of bubble sorting]
Arduino uno connected to jq8900-16p voice broadcast module
Prophet
微信模版消息errcode“:40165,“errmsg“:“invalid weapp pagepath
How to handle error code 30204-44 when installing office 2016 in win10?
Link list of high frequency written interview question brushing summary (distribution explanation & code annotation)
两部门联合印发《校外培训机构消防安全管理九项规定》
List 过滤、排序、校验等处理方法
【大咖秀】博睿数据眼中的AIOps,选择正确的赛道正确的人
Application of the remote acquisition IOT gateway of the Bashir trough flowmeter in open channel flow monitoring
判断一串数字是否是快速排序某一次的结果
List filtering, sorting, verification and other processing methods
最长递增子序列
CPT 102_LEC 17
求MySQL先按大于等于当前时间升序排序,再按小于当前时间降序排序