I have an application running on Cloud Foundry with Spring Boot (1.5.12) and spring-boot-starter-amqp
Based on the previous SO answer to set heartbeat property on rabbitmq autoconfig connectionfactory bean, I tried setting the heart beat property as follows.
cf set-env app spring.rabbitmq.requested-heartbeat 30
cf restage app
However, when viewed through the Rabbit Management Console, the connection still indicates the heart beat is at the default of 60s.
I took a heap dump using the actuator endpoints, and took a look at the connectionFactory
that seemed to have been auto-reconfigured by spring-cloud-spring-service-connector. It seems to have the default 60 seconds, and ignores the 30 seconds requested.
Is there another environment property that should be used to configure the heartbeat value ? If not, I suspect we will wire the CachingConnectionFactory
and modify it in there.