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

订阅的时候报错 #5

Open
2723659854 opened this issue Jan 14, 2023 · 1 comment
Open

订阅的时候报错 #5

2723659854 opened this issue Jan 14, 2023 · 1 comment

Comments

@2723659854
Copy link

2723659854 commented Jan 14, 2023

"hyperf/nsq": "2.2.33",
订阅的时候报错,传的是一个字符串”D_PROTOCOL“,执行Json::decode($this->getPayload())就会报错。
报错内容:

[ERROR] Hyperf\Utils\Exception\InvalidArgumentException: Syntax error(4) in /data/project/hyper_pool/vendor/hyperf/utils/src/Codec/Json.php:51
Stack trace:
#0 /data/project/hyper_pool/vendor/hyperf/nsq/src/Subscriber.php(79): Hyperf\Utils\Codec\Json::decode()
#1 /data/project/hyper_pool/vendor/hyperf/nsq/src/Pool/NsqConnection.php(68): Hyperf\Nsq\Subscriber->getJsonPayload()
#2 /data/project/hyper_pool/vendor/hyperf/pool/src/KeepaliveConnection.php(91): Hyperf\Nsq\Pool\NsqConnection->getActiveConnection()
#3 /data/project/hyper_pool/vendor/hyperf/pool/src/KeepaliveConnection.php(110): Hyperf\Pool\KeepaliveConnection->reconnect()
#4 /data/project/hyper_pool/vendor/hyperf/nsq/src/Nsq.php(154): Hyperf\Pool\KeepaliveConnection->call()
#5 /data/project/hyper_pool/vendor/hyperf/nsq/src/Nsq.php(113): Hyperf\Nsq\Nsq->call()
#6 /data/project/hyper_pool/vendor/hyperf/nsq/src/ConsumerManager.php(142): Hyperf\Nsq\Nsq->subscribe()
#7 /data/project/hyper_pool/vendor/hyperf/process/src/AbstractProcess.php(134): class@anonymous->handle()
#8 {main}
@huangzhhui
Copy link
Member

贴复现代码

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

2 participants