为什么不 spring amqp 提供者一个 sendAndAsyncReceive 方法签名?

Why not spring amqp provider a sendAndAsyncReceive method signature?

有时我们需要异步发送消息并在消息结果异步时提供回调 returned。 现在,只有阻塞方法 sendAndReceive;为什么不通过传递回调参数或 return listentablefuture 来提供 sendAndAsyncReceive 方法?

因为没有人要求它。

您可以使用 send() 并配置一个异步消费者 (SimpleMessageListenerContainer) 来接收回复。

随意打开一个新功能JIRA issue,或者更好的是,考虑贡献。

编辑:

Here's a gist with sample code.