Search code examples
spring-bootapache-camelspring-camel

How to use CachingConnectionFactory with Camel 4 / Spring 3 / Spring Boot 6


For Camel 3, the following configuration worked

camel.component.spring-rabbitmq.connection-factory=org.springframework.amqp.rabbit.connection.CachingConnectionFactory

to use a CachingConnectionFactory. With Camel 4, this fails with

No type converter available to convert from type: java.lang.String to the required type: org.springframework.amqp.rabbit.connection.ConnectionFactory

I tried to use a Bean that returns a new CachingConnectionFactory(), but this does not heed the spring.rabbitmq.host etc. configuration, and only connects to localhost.

How is this fixed ?


Solution

  • It seems like the CachingConnectionFactory is the default. There is no need to configure anything.