Camel RabbitMQ除了将消息路由到队列之外,还创建生成的队列

Camel RabbitMQ除了将消息路由到队列之外,还创建生成的队列,rabbitmq,apache-camel,Rabbitmq,Apache Camel,我有一个exchange设置amq.topic,其中有一个指向我的密钥的路由密钥 我有一个用rest端点定义的路由。我使用json{“sample”:“sample”}作为主体调用该端点 这实现了我想要的:我的rest调用的主体将被发送到主题交换,主题交换将根据路由键进入我的队列 问题是:它还创建了一个自动生成的队列 [ qtp86171426-28] RabbitMQProducer INFO Starting reply mana

我有一个exchange设置amq.topic,其中有一个指向我的密钥的路由密钥

我有一个用rest端点定义的路由。我使用json{“sample”:“sample”}作为主体调用该端点

这实现了我想要的:我的rest调用的主体将被发送到主题交换,主题交换将根据路由键进入我的队列

问题是:它还创建了一个自动生成的队列

 [                qtp86171426-28] RabbitMQProducer               INFO  Starting reply manager service RabbitMQReplyManagerTimeoutChecker[amq.topic]
[                qtp86171426-28] ReplyManagerSupport            INFO  Using temporary queue name: amq.gen-JGF0CKioQ6_MLA9uBNIOOQ
[                qtp86171426-28] CorrelationTimeoutMap          INFO  in putIfAbsent with key Camel-ID-L-VC-10050-58983-1467158153454-0-3
[nagerTimeoutChecker[amq.topic]] TemporaryQueueReplyHandler     INFO  in onTimeout with correlationId= Camel-ID-L-VC-10050-58983-1467158153454-0-3
[nagerTimeoutChecker[amq.topic]] ReplyManagerSupport            WARN  Timeout occurred after 20000 millis waiting for reply message with correlationID [Camel-ID-L-VC-10050-58983-1467158153454-0-3] on destination amq.gen-JGF0CKioQ6_MLA9uBNIOOQ. Setting ExchangeTimedOutException on (MessageId: ID-L-VC-10050-58983-1467158153454-0-2 on ExchangeId: ID-L-VC-10050-58983-1467158153454-0-1) and continue routing.

我已经尝试过SkipQueeDeclare和skipexchangedeclare,但对于它生成队列的原因,我已经没有什么想法了。有人有什么想法吗?

将ExchangePattern设置为InOnly

临时和回复队列是因为路由需要回复,所以创建临时队列以等待响应


因此,如果rest端点没有返回任何内容,请在rest调用时将ExchangePattern设置为Inonly,这样就可以了。或者将其设置为.to()。

是的,我最终发现了这一点。我做到了。只对(交换模式,”rabbitmq://rabbiturl:port/amq.topic?connectionFactory=rabbitmqConnectionFactory&autoDelete=false&routingKey=myroutingkey&declare=false&exchangeType=topic")
 [                qtp86171426-28] RabbitMQProducer               INFO  Starting reply manager service RabbitMQReplyManagerTimeoutChecker[amq.topic]
[                qtp86171426-28] ReplyManagerSupport            INFO  Using temporary queue name: amq.gen-JGF0CKioQ6_MLA9uBNIOOQ
[                qtp86171426-28] CorrelationTimeoutMap          INFO  in putIfAbsent with key Camel-ID-L-VC-10050-58983-1467158153454-0-3
[nagerTimeoutChecker[amq.topic]] TemporaryQueueReplyHandler     INFO  in onTimeout with correlationId= Camel-ID-L-VC-10050-58983-1467158153454-0-3
[nagerTimeoutChecker[amq.topic]] ReplyManagerSupport            WARN  Timeout occurred after 20000 millis waiting for reply message with correlationID [Camel-ID-L-VC-10050-58983-1467158153454-0-3] on destination amq.gen-JGF0CKioQ6_MLA9uBNIOOQ. Setting ExchangeTimedOutException on (MessageId: ID-L-VC-10050-58983-1467158153454-0-2 on ExchangeId: ID-L-VC-10050-58983-1467158153454-0-1) and continue routing.