ActiveMQ Artemis 转移日志记录

ActiveMQ Artemis divert logging

有没有办法记录活跃的 mq Artemis 转移?这样您就可以看到给定消息应用了哪个转移?我似乎无法在文档中找到它。

可以在此处的文档中找到一个选项:

Diverts can also be configured to apply a Transformer. If specified, all diverted messages will have the opportunity of being transformed by the Transformer.

由于 Transformer 是 class 您可以使用 Logger 实现来实现和跟踪,而无需触及消息。

您可以为 org.apache.activemq.artemis.core.server.impl.DivertImpl 激活 TRACE 日志记录。这将为每条转移的消息记录一条消息。请参阅日志记录代码 here