是否可以直接从命令行查看RabbitMQ消息的内容? [英] Is it possible to view RabbitMQ message contents directly from the command line?

查看:3612
本文介绍了是否可以直接从命令行查看RabbitMQ消息的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以直接从命令行查看RabbitMQ消息的内容?

Is it possible to view RabbitMQ message contents directly from the command line?

sudo rabbitmqctl list_queues列出队列.

有没有像sudo rabbitmqctl list_queue_messages queue_name这样的命令命令?

Is there any command command like sudo rabbitmqctl list_queue_messages queue_name?

推荐答案

您应启用管理插件.

rabbitmq-plugins enable rabbitmq_management

在这里看到:

http://www.rabbitmq.com/plugins.html

这里是管理的细节.

http://www.rabbitmq.com/management.html

最后,完成设置后,您需要按照以下说明安装和使用Rabbitmqadmin工具.可以用来与系统完全交互. http://www.rabbitmq.com/management-cli.html

Finally once set up you will need to follow the instructions below to install and use the rabbitmqadmin tool. Which can be used to fully interact with the system. http://www.rabbitmq.com/management-cli.html

例如:

rabbitmqadmin get queue=<QueueName> requeue=false

将为您提供队列中的第一条消息.

will give you the first message off the queue.

这篇关于是否可以直接从命令行查看RabbitMQ消息的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆