【问题标题】:Moquette internalPublish equivalent function in Apache ActiveMQ ArtemisApache ActiveMQ Artemis 中的 Moquette internalPublish 等效函数
【发布时间】:2017-02-28 05:01:21
【问题描述】:

Apache ActiveMQ Artemis 中是否有等效的 Moquette internalPublish 函数?我需要在我的代码中从代理内部发布一些消息。有人可以告诉我如何在 ActiveMQ Artemis 中做到这一点吗?

【问题讨论】:

    标签: activemq activemq-artemis


    【解决方案1】:

    您可以使用 PostOffice.route(Message) 方法。

    当前实现采用 PostOffice.route(ServerMessage message, direct)。直接传递 false 否则消费者将在同一个线程中交付。

    我不推荐这种想法。正确的方法是创建一个合适的生产者。如果您愿意,可以将其设为 IN-VM。

    目前我正在将签名更改为路由(消息,布尔直接)。

    【讨论】:

      猜你喜欢
      • 2020-10-09
      • 1970-01-01
      • 1970-01-01
      • 2019-01-21
      • 2019-09-30
      • 2020-07-10
      • 1970-01-01
      • 2020-07-09
      • 1970-01-01
      相关资源
      最近更新 更多