且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何为同一个 Camel RouteBuilder 配置方法设置两个 RabbitMQ 连接

更新时间:2022-02-22 07:51:03

我相信我可能在另一个问题中找到了你的答案

I believe I may have found your answer in another question

Camel 中的无限循环 - Rabbit MQ

显然设置 BridgeEnpoint=false 选项会阻止此操作.没有指定这个 EXCHANGE_NAME 和 ROUTING_KEY 标头是从接收到的消息中获取的,覆盖了您在to"配置中可能指定的任何内容.例如...rabbitmq://localhost/B?connectionFactory=connectionFactoryProcessed&autoDelete=false&queue=processed&BridgeEndpoint=false

Apparently setting BridgeEnpoint=false option stops this. Without specifying this the EXCHANGE_NAME and ROUTING_KEY headers are taken from the received message overriding whatever you might have specified in the "to" configuration. For example... rabbitmq://localhost/B?connectionFactory=connectionFactoryProcessed&autoDelete=false&queue=processed&BridgeEndpoint=false