We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
推送:sync_publish(Builder::instance(), $params, null, true); 说明文档中,最后的close 参数,最好默认是true。 如果该方法应用在 controller 部分,这个会因为没有固定的 心跳监听而造成大量的发布失败。 虽然每次都会重新创建连接,那也是稳定和高效的。
process 里的消息接收。建议加入重连检查。有时候网络断开造成的消费者丢失没有重连。 或者搞个重连开关。
` public function onWorkerStart(Worker $worker): void { parent::onWorkerStart($worker);
Timer::add(10, function () { $this->checkConnection(); }); } private function checkConnection() { try { if($this->connection()->client()->isConnected() == false) { $this->logger->debug('Reconnect'); $this->connection()->consume($this->getMessage()); }else { $this->logger->debug('Connection is OK'); } } catch (\Exception $e) { $this->logger->error($e->getMessage()); } }
`
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
3908dd2
No branches or pull requests
推送:sync_publish(Builder::instance(), $params, null, true); 说明文档中,最后的close 参数,最好默认是true。 如果该方法应用在 controller 部分,这个会因为没有固定的 心跳监听而造成大量的发布失败。 虽然每次都会重新创建连接,那也是稳定和高效的。
process 里的消息接收。建议加入重连检查。有时候网络断开造成的消费者丢失没有重连。 或者搞个重连开关。
`
public function onWorkerStart(Worker $worker): void
{
parent::onWorkerStart($worker);
`
The text was updated successfully, but these errors were encountered: