From my spring-boot service(with camel) I need to connect to two RabbitMQ instances;not cluster, but altogether different instances(with diff IP, vhost and credentials)
Versions: spring-boot: 1.5.12 and camel: 2.21.5
I want to create multiple connection factories and specify them in the camel endpoint name like this.
rabbitmq:exchange1?connectionFactory=#customFactory1
rabbitmq:exchange2?connectionFactory=#customFactory2
Currently this is not supported as RabbitAnnotationDrivenConfiguration class expects only one instance of ConnectionFactory
Even if I qualify the ConnectionFactory Beans with @Qualifier
/@Primary
the connectionFactory query param used in camel endpoint is ignored (or) properties from camel.component.rabbitmq
are taking priority
I'm now using a workaround to specify all the connection properties in the endpoint name like
rabbitmq:exchange1?host=<host>&vhost=<vhost>&username=something&password=something
Is there a better way to achieve this...?