Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x版本存在问题 #22

Closed
Caesar-Tang-X opened this issue May 21, 2024 · 0 comments
Closed

2.x版本存在问题 #22

Caesar-Tang-X opened this issue May 21, 2024 · 0 comments

Comments

@Caesar-Tang-X
Copy link

2.x版本存在很多问题,问题如下:

  1. 文档有误:
    (1)在创建消费者的延迟QueueBuilder时,如 "./webman workbunny:rabbitmq-builder test --delayed--mode=queue" 缺少空格
    (2)移除QueueBuilder时,如 "./webman workbunny:rabbitmq-remove test --mode=queue",提示没有 --mode 选项

  2. 创建延时QueueBuilder,投递信息有误,以下为复现步骤:
    (1)版本如下:

"workerman/webman-framework": "1.4.7",
"workbunny/webman-rabbitmq": "^2.1"

(2)创建延时QueueBuilder:
/webman workbunny:rabbitmq-builder test --delayed --mode=queue
(3)投递消息

$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
image
(5)尝试解决:
将 TestBuilderDelayed 里的 $exchangeType 值修改为 "Constants::DELAYED" ,重启后发现不会创建对应的消费者,且投递时第一次投递失败,后面可以投递成功,但不会消费

@Caesar-Tang-X Caesar-Tang-X changed the title 2.x版本存在很多问题 2.x版本存在问题 May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant