国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

請(qǐng)問redis-queue的tls連接方式

螞蟻搬家

問題描述

請(qǐng)問 http://wtbis.cn/doc/workerman/components/workerman-redis-queue.html
Redis隊(duì)列怎么加密連接 tls

[
        'host' => 'redis://127.0.0.1:1234',
        'options' => [
            'auth'     => 'testtest',     // 密碼,可選參數(shù)
            'db' => 2,      // 數(shù)據(jù)庫(kù)
            'max_attempts'  => 5, // 消費(fèi)失敗后,重試次數(shù)
            'retry_seconds' => 30, // 重試間隔,單位秒
         ]
    ]

我用了Redis7 Tls怎么都儲(chǔ)存不了數(shù)據(jù) 用阿里云的可以

已經(jīng)解決。
配置文件改成

[
        'host' => 'redis://127.0.0.1:1234',
        'options' => [
            'auth'     => 'testtest',     // 密碼,可選參數(shù)
            'db' => 2,      // 數(shù)據(jù)庫(kù)
            'max_attempts'  => 5, // 消費(fèi)失敗后,重試次數(shù)
            'retry_seconds' => 30, // 重試間隔,單位秒
            'ssl' => 1, // 0關(guān)閉 1開啟
         ]
    ]

修改源碼 /vendor/workerman/redis/src/Client.php
在328行 $this->_connection = new AsyncTcpConnection($this->_address, $context); 后 添加

 // 自行改造加密鏈接
 if($this->_options['ssl'] === 1){
    $this->_connection->transport = 'ssl';
 }
915 1 0
1個(gè)回答

螞蟻搬家

已解決

  • 暫無評(píng)論
年代過于久遠(yuǎn),無法發(fā)表回答
??