【问题标题】:java: Using a remote JMS providerjava:使用远程 JMS 提供程序
【发布时间】:2023-03-29 19:28:01
【问题描述】:

我有一个 tomcat 网络应用程序。它使用了几个远程模块。其中一个模块将一些消息(关于它的状态)发布到队列中。我需要阅读它。我该怎么做? 据我所知,我需要实现 IninialContext 才能按名称获取远程队列,对吗?网上没找到有用的资料。

【问题讨论】:

    标签: java jms provider


    【解决方案1】:

    在 activemq 网站上的这个链接上:http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html 看看 ServerClient 类,以获取编写 JMS ConsumerProducer 的帮助。

    【讨论】:

    • 谢谢。这很简单:我填充了 Property 对象并使用它创建 InitialContext。以下所有内容都与示例中的一样。
    猜你喜欢
    • 2015-01-25
    • 2018-09-20
    • 1970-01-01
    • 1970-01-01
    • 2023-04-08
    • 1970-01-01
    • 2017-11-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多