Call to a member function publish() on int

LokiLiu

问题描述

插件:【workbunny】RabbitMQ客户端
压测发布消息,发布到2048个的时候就报错了

程序代码

for ($i = 1; $i <= 5000; $i++) {
    sync_publish(TestBuilder::instance(), $i);
}

报错信息

[2024-06-23 19:11:22] default.ERROR: 1719141082.4885 ["2046"] []
[2024-06-23 19:11:22] default.ERROR: 1719141082.489 ["2047"] []
[2024-06-23 19:11:22] default.ERROR: 127.0.0.1 POST 127.0.0.1:50000/api/mqtt/test
Error: Call to a member function publish() on int in E:\test\admin\vendor\workbunny\webman-rabbitmq\src\Connection.php:241
Stack trace:
#0 E:\test\admin\vendor\workbunny\webman-rabbitmq\src\helpers.php(33): Workbunny\WebmanRabbitMQ\Connection->syncPublish(Object(Workbunny\WebmanRabbitMQ\BuilderConfig), false)

操作系统及workerman/webman等框架组件具体版本

windows10
PHP8.1.17
webman-framework1.5.16
workbunny/webman-rabbitmq2.1.3

313 0 0
0个回答

×
🔝