MessageListenerContainer如何异步监听消息?

发布于 2024-12-09 20:51:53 字数 44 浏览 4 评论 0原文

是否有建立持久的 TCP 连接?任何 TCP 端口都可以打开以使其工作吗?

Is there any long-lasting TCP connecton be set up? Any TCP port be open for this to work?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

独行侠 2024-12-16 20:51:53

来自 spring 文档

消息侦听器容器是 MDP 和消息传递提供程序之间的中介

MessageListenerContainer 是一些粘合代码。真正有趣的事情发生在 JMS 提供者中。是的,它几乎肯定涉及 TCP 连接或类似的东西。

具体细节是实施细节。请查阅您的 JMS 供应商文档,也许他们会详细说明。

From the spring docs

A message listener container is the intermediary between an MDP and a messaging provider

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.

仅冇旳回忆 2024-12-16 20:51:53

如果您指的是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文