php - I want to use redis to queue up WeChat notifications, how should I start?
phpcn_u1582
phpcn_u1582 2017-05-27 17:42:55
0
3
486

1. I want to do one-click shipping in the background, and then queue up the orders belonging to this pick-up point to send WeChat notifications.
2. WeChat notifications and one-click shipping have been completed, and I just need to queue up and send notifications.

phpcn_u1582
phpcn_u1582

reply all(3)
小葫芦

1. Save in redis queue.

2.php provides a non-timeout interface. The function of this interface is to loop to pop the data in the queue and send notifications.

Why use redis

1. Queue cache, high speed, convenient and simple maintenance.

2. The queue form is relatively controllable, and pushing to third parties is a timeout behavior, so it is better to make a separate request interface to submit. Or you can make a crond scheduled task and submit it automatically.

巴扎黑

First save the production data into redis, and then the consumer consumes the data and sends a WeChat notification.

伊谢尔伦

Queuing, a better choice is message queue, such as RabbitMQ, ActiveMQ, etc.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!