Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Application decoupling of queue message in redis

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

What this article shares to you is about the application decoupling of the queue message in redis. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.

1. What if the redis server hangs up?

Make a judgment in the signing logic code of the purchasing module, return the signing completion if the listing is successful, and run the traditional method through the interface if the listing fails. What if the redis is dead and the warehouse module is also dead? pack your bags and go home.

2. How to store it in real time in the traditional way?

It can be solved by using redis's subscription and publishing model. The subscription code is placed in the warehouse module, and the published code is placed in the procurement module.

Subscription code sub.php

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report