MessageListenerContainer如何异步监听消息?
是否有建立持久的 TCP 连接?任何 TCP 端口都可以打开以使其工作吗?
Is there any long-lasting TCP connecton be set up? Any TCP port be open for this to work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来自 spring 文档
MessageListenerContainer 是一些粘合代码。真正有趣的事情发生在 JMS 提供者中。是的,它几乎肯定涉及 TCP 连接或类似的东西。
具体细节是实施细节。请查阅您的 JMS 供应商文档,也许他们会详细说明。
From the spring docs
MessageListenerContainer is some glue code. The real interesting stuff is going on in the JMS provider. And yes, it almost certainly involves a TCP connection or something similar.
The specifics are an implementation detail. Consult your JMS vendor documentation and maybe they'll spell it out.
如果您指的是 Spring 的消息侦听器容器(但您没有声明),它会从注入的 connectionFactory 属性获取连接,因此您需要检查
javax.jms.ConnectionFactory code> JMS 提供程序的实现可以为您提供线索。它可能会也可能不会通过 TCP。它很可能嵌入到同一个 JVM 中,例如测试设置中。
If you mean Spring's message listener container (but you haven't stated that), it takes the connection from the injected connectionFactory property, so you need to examine the
javax.jms.ConnectionFactory
implementation of your JMS provider to give you a clue. It may or may not be over TCP. It may well be embedded inside the same JVM, in a test setup, for example.