0

我正在使用 PCF 运行我的 spring-boot 应用程序。还使用了 PCF RabbitMQ 服务。

我的问题是有一段时间队列中的消息在未确认的情况下被固定很长时间,我注意到 PCF 中正在运行的应用程序实例的数量少于 RabbitMQ 中的活动消费者通道的数量。

兔MQ

聚碳酸酯

我还启用了自动缩放器,它将根据应用的规则自动放大/缩小应用程序实例。

我没有运气复制该问题,因为客户端应用程序中没有错误日志,我所做的唯一解决方案是在 PCF 中重新启动应用程序。我还尝试强制终止应用程序,似乎消费者渠道也被破坏了。

我可以查找任何帮助或建议吗?我在我的消费者应用程序中使用了 Spring Cloud Stream,并在 yml 文件中使用了非常基本的配置(没有 dlq,没有自定义超时等)

提前致谢!

4

2 回答 2

1

2.0.x is no longer supported; however, the latest 2.0.x is 2.0.14.

If you are using auto recovery in the amqp-client (not recommended because Spring AMQP has its own recovery mechanisms pre-dating autorecovery in the client), there was a fix included in 2.0.7.

You should at least upgrade to 2.0.14, but preferably to a newer supported release; the current release is 2.2.10.

That said, the vast majority of issues like this are caused by the listener thread being "stuck" in user code; take a thread dump the next time it happens.

于 2020-08-19T14:08:40.757 回答
1

我们有类似的问题,据我记得,我们不得不在兔子连接工厂上将 automaticRecoveryEnabled 设置为 false,因为这与 spring 自动恢复之间存在冲突。

于 2020-08-21T13:38:37.213 回答