RabbitMQ 问题 - 有没有办法将日志消息打印到控制台?
我在 Windows 7 上运行 RabbitMQ(目前出于调试原因)。 我希望每次发送消息时都能在打开的控制台上看到消息。 有没有办法将日志路由到打开的控制台? 10倍
I am running RabbitMQ on windows 7 ( currently for debug reasons).
I want to see the messages on the open console each time I send a message.
Is there a way to rout the logs to the open console?
10x
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
创建一个连接到rabbitMQ的记录器应用程序,创建一个队列,该队列消耗从代理发送的所有消息,这最适合扇出交换或主题交换,您可以将路由键设置为#(即对于所有内容)。当您使用每条消息时,您可以将其打印到控制台或日志中。这将与您的应用程序分开,您可以随时轻松打开或关闭它。它不应该通过添加一个额外的队列来显着减慢当前系统的速度。
Create a logger application that connects to rabbitMQ creates a queue that consumes all messages sent from the broker, this works best with a fanout exchange or a topic exchange where you can set the routing key to be # (ie for everything). As you consume each message you can print it to the console or to a log. This will be separate from your apps and you can easily turn it of or on when ever you want. It should not slow down noticably the current system by adding a single extra queue.
您可以使用用于发布和使用来自 RabbitMQ 的消息的编程语言来完成此操作。
You can do it in, the programming language you are using to Publish and consume messages from RabbitMQ.