Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
internalPublishApache ActiveMQ Artemis 中是否有等效的 Moquette函数?我需要在我的代码中从代理内部发布一些消息。有人可以告诉我如何在 ActiveMQ Artemis 中做到这一点吗?
internalPublish
您可以使用 PostOffice.route(Message) 方法。
当前的实现采用 PostOffice.route(ServerMessage message, direct)。直接传递 false 否则消费者将在同一个线程中交付。
我不推荐这种想法。正确的方法是创建一个合适的生产者。如果您愿意,可以将其设为 IN-VM。
目前我正在将签名更改为路由(消息,布尔直接)。