You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Tobias Letschka <tl...@covernet.de> on 2020/08/15 17:01:32 UTC

toD() and rabbitMQ - dynamic queues

Hi

We  using  apache camel version 2.24.3 + spring-boot 2. 

Now we tried to connect different servers with toD() for example:

.setHeader("rabbitmq.EXCHANGE_OVERRIDE_NAME", constant("http://${exchangeProperty.genisys_client_magento_host}“))
.toD("rabbitmq:productUpload?hostname=localhost&autoDelete=false“)

And we use a connection factory:

@Configuration
public class RabbitMQ {

   @Value("${camel.component.rabbitmq.username}")
   private String username;

   @Value("${camel.component.rabbitmq.password}")
   private String password;

   @Bean
   public ConnectionFactory rabbitConnectionFactory() {
       ConnectionFactory cf = new ConnectionFactory();
       cf.setHost("localhost");
       cf.setPort(5672);
       cf.setUsername(username);
       cf.setPassword(password);
       return cf;
   }
}

Can we change rabbit-Queue while runtime?

Regards Tobias