Closed Caesar-Tang-X closed 2 months ago
2.x版本存在很多问题,问题如下:
文档有误: (1)在创建消费者的延迟QueueBuilder时,如 "./webman workbunny:rabbitmq-builder test --delayed--mode=queue" 缺少空格 (2)移除QueueBuilder时,如 "./webman workbunny:rabbitmq-remove test --mode=queue",提示没有 --mode 选项
创建延时QueueBuilder,投递信息有误,以下为复现步骤: (1)版本如下:
"workerman/webman-framework": "1.4.7", "workbunny/webman-rabbitmq": "^2.1"
(2)创建延时QueueBuilder: /webman workbunny:rabbitmq-builder test --delayed --mode=queue (3)投递消息
/webman workbunny:rabbitmq-builder test --delayed --mode=queue
$taskDelayedBuilder = TestBuilderDelayed::instance(); $taskDelayedMsg = json_encode([ 'id'=>1111 ], JSON_UNESCAPED_UNICODE); $taskDelayedHeader['x-delay'] = 3000; $taskDelayedResult = sync_publish($taskDelayedBuilder, $taskDelayedMsg, null, $taskDelayedHeader);
提示: Invalid publish. (4)定位问题:vendor/workbunny/webman-rabbitmq/src/helpers.php (5)尝试解决: 将 TestBuilderDelayed 里的 $exchangeType 值修改为 "Constants::DELAYED" ,重启后发现不会创建对应的消费者,且投递时第一次投递失败,后面可以投递成功,但不会消费
Invalid publish.
2.x版本存在很多问题,问题如下:
文档有误: (1)在创建消费者的延迟QueueBuilder时,如 "./webman workbunny:rabbitmq-builder test --delayed--mode=queue" 缺少空格 (2)移除QueueBuilder时,如 "./webman workbunny:rabbitmq-remove test --mode=queue",提示没有 --mode 选项
创建延时QueueBuilder,投递信息有误,以下为复现步骤: (1)版本如下:
(2)创建延时QueueBuilder:
/webman workbunny:rabbitmq-builder test --delayed --mode=queue
(3)投递消息提示:
(5)尝试解决:
将 TestBuilderDelayed 里的 $exchangeType 值修改为 "Constants::DELAYED" ,重启后发现不会创建对应的消费者,且投递时第一次投递失败,后面可以投递成功,但不会消费
Invalid publish.
(4)定位问题:vendor/workbunny/webman-rabbitmq/src/helpers.php