php redis实现一个延迟消息队列代码
代码语言:phpcli
所属分类:其他
代码描述:php redis实现一个延迟消息队列代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<?php
class DelayQueue
{
protected $prefix = 'delay_queue:';
protected $redis = null;
protected $key = '';
private static $_instance = null;
/**
* 构造函数
* DelayQueue constructor.
* @param $queue
* @param array $config
*/
public function __construct($queue,$config = [])
{
$this->key = $this->prefix . $queue;
$this->redis = new Redis();
$this->redi.........完整代码请登录后点击上方下载按钮下载查看















网友评论0