首页 文章

Spring AMQP使用noLocal使用者发送和接收临时队列

提问于
浏览
1

使用临时队列发送和接收时,会创建使用 noLocal 属性设置为 true 的使用者(请参阅RabbitTemplate#doSendAndReceiveWithTemporary method line 1297 of version 1.7.4.RELEASE) .

根据javadocs for the basicConsume method,当此属性设置为 true 时,则"the server should not deliver to this consumer messages published on this channel's connection" .

现在,据我所知,这个消费者正在被设置为实际接收回复消息 . 如果我是正确的,那么由于 noLocal 属性被设置为 true ,所以不应该收到回复 not

当使用RabbitMQ作为AMQP代理时,收到回复消息就好了 . 但是,使用Apache Qpid时,不会收到回复 . 实际上,只有在 noLocal 属性设置为 false 时才会收到它 .

1 回答

  • 0

    让服务器端在与客户端相同的应用程序中运行有点不寻常 . 这是非本地应该影响这种情况的唯一方法,因为通常情况下,客户端不会发布回复 .

    我们不声称与QPID兼容(当然不是AMQP 1.0),但我看到QPID声称支持AMQP 0.9.x所以随时打开JIRA Issue我们会在时间允许的情况下查看 .

相关问题