laravel5.8使用redis集群queue报错

环境:
腾讯云买的redis集群

暴漏了一个ip和一个端口,我使用了默认的redis配置:

laravel7.x使用redis集群cache报错

项目里装了laravel/horizon,laravel版本5.8

在用redis异步队列的时候其中一个报错:

CROSSSLOT Keys in request don’t hash to the same slot

报错的对象:

object(Illuminate\Foundation\Bus\PendingDispatch)#928 (1) {
  ["job":protected]=>
  object(App\Jobs\SendCode)#24 (8) {
    ["data":protected]=>
    array(3) {
      ["content"]=>
      string(4) "aaaa"
      ["contact"]=>
      string(18) "1234@qq.com"
      ["type"]=>
      string(5) "email"
    }
    ["job":protected]=>
    NULL
    ["connection"]=>
    NULL
    ["queue"]=>
    string(14) "reset_pwd_code"
    ["chainConnection"]=>
    NULL
    ["chainQueue"]=>
    NULL
    ["delay"]=>
    NULL
    ["chained"]=>
    array(0) {
    }
  }
}

而另外一个正常:

object(Illuminate\Foundation\Bus\PendingDispatch)#928 (1) {
  ["job":protected]=>
  object(App\Jobs\LoginLog)#24 (12) {
    ["user":protected]=>
    array(2) {
      ["account_id"]=>
      string(6) "qazwsx"
      ["workcode"]=>
      string(3) "123"
    }
    ["plat":protected]=>
    string(3) "web"
    ["ip":protected]=>
    string(7) "0.0.0.0"
    ["appid":protected]=>
    string(6) "123456"
    ["login_time":protected]=>
    string(19) "2020-09-18 17:34:55"
    ["job":protected]=>
    NULL
    ["connection"]=>
    NULL
    ["queue"]=>
    NULL
    ["chainConnection"]=>
    NULL
    ["chainQueue"]=>
    NULL
    ["delay"]=>
    NULL
    ["chained"]=>
    array(0) {
    }
  }
}
《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
最佳答案

file

3年前 评论
gedongdong2010 (楼主) 3年前
讨论数量: 3

file

3年前 评论
gedongdong2010 (楼主) 3年前

@gedongdong2010 最后你是怎么解决呢,我同样使用腾讯云redis集群版,horizon报同样错误,但是队列名是有{}括号的

2年前 评论
gedongdong2010 (楼主) 2年前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!