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

Error: Call to a member function publish() on int in #25

Closed
df131 opened this issue Jul 29, 2024 · 2 comments
Closed

Error: Call to a member function publish() on int in #25

df131 opened this issue Jul 29, 2024 · 2 comments
Labels
question Further information is requested

Comments

@df131
Copy link

df131 commented Jul 29, 2024

for ($i=1;$i<=50000;$i++){ sync_publish(TestBuilder::instance(),$msg,'',[],true); }
调用时,发现channel一直涨,如何在发布时释放掉channel

@chaz6chez
Copy link
Member

chaz6chez commented Aug 1, 2024

rabbitmq client的channel本身会复用,只有在闲置channel不够的情况下新增,循环测试中,由于循环迭代速度较快,消息发布的过程中channel都不存在闲置的情况,这时channel就会新增;

使用fo循环进行消息发送时,请酌情调高rabbitmq server的channel配置上限,并在webma-rabbitmq的配置中开启连接复用

@chaz6chez chaz6chez added the question Further information is requested label Aug 5, 2024
@chaz6chez
Copy link
Member

升级至2.1.5,配置中开启reuse_channel(reuse_channel=true),详情查看readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants