我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

RabbitMQ在SIGINT上制动循环

I use rabbitMQ exactly like manual shows (manual).

while(count($this->channel->callbacks)) {
    $this->channel->wait();
}

But when I want to terminate my worker I press Ctrl + c in console, the worker gets the SIGINT signal. The problem is that if there are no messages in a queue, the $channel->wait() method never comes to next iteration, thus it can't be terminated unless I kill it with kill -9. So how can I terminate this endless loop with SIGINT?

近期文章

  • www到非www重定向问题
  • PHP JQuery自动完成背景
  • 在client-> fetchAccessTokenWithAssertion()中获取错误
  • Magento 1.9.1.0更新PHP和Mysql
  • wordpress中的视频预卷vimeo
  • 用htaccess重写网址
  • Google Calendar API会获取可用的事件颜色,从而导致未定义的方法致命错误
  • 错误:未定义的偏移量,需要将值传递给Select语句
  • 如何以编程方式使用PHP进行无限递归
  • IPN模拟器:“未发送IPN,并且未验证握手。 请检查您的信息“
  • 重复输入的更新
  • 无法在Woo商务购物车部分的标题下显示产品自定义字段
  • 面对的PHP PDO常见错误
  • php mysql_connect():使用旧(4.1.1之前)身份验证协议的连接被拒绝
  • Magento与论坛的整合
  • 使用Steam probs登录
  • 表单方法不从html表单返回数据,其中数据来自mysql中的单个列
  • 从表单提交输出文件生成pdf
  • 构建一个表单字段来填充脚本中的行?
  • DOMDocument loadHTMLFile()被重新格式化

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华