How does PHP use beanstalkd asynchronous task queue to implement WeChat Mini Programs to send template messages in groups?

A novice to PHP has seen on the Internet that some people say that WeChat Mini Programs uses the beanstalkd asynchronous task queue to send unlimited group template messages. Now beanstalkd has been installed, but there is no way of thinking. How to push template messages at a fixed time every day? is it through the queue setting or do you need to write a script to call the interface of the execution queue at a fixed time every day?


there are many ways to implement asynchronous task queues, such as https://codeshelper.com/q/10.


SWBT framework https://github.com/YWNA/SWBT, a framework that implements multi-process asynchronous processing of message queues based on Swoole and beanstalkd.


implements a blocking mode consumption queue. When you insert the queue, you tell beantalked how long to delay execution! He has implemented the delay queue function
officially there are related PHP SDK


you can add it to the queue using beanstalkd's producer method and delay it to the time you specify, and then the consumer class will read out all the tasks in the queue pipeline at that time and execute

one by one.
Menu