博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Management 命令行工具
阅读量:6705 次
发布时间:2019-06-25

本文共 5065 字,大约阅读时间需要 16 分钟。

hot3.png

参考:

Management Command Line Tool

拥有跟Web UI同样的功能,可能还更便于脚本使用。rabbitmqadmin仅仅是一个定制的HTTP客户端,如果想在自己的程序中引入 rabbitmqadmin的话,可以直接使用HTTP API。rabbitmqadmin可以在

Obtaining rabbitmqadmin

访问页面:wget   ,获取index.html

访问页面:wget 获取rabbitmqadmin

Getting started

Unix users will probably want to copy rabbitmqadmin to /usr/local/bin.

Windows users will need to ensure Python is on their path, and invoke rabbitmqadmin as python.exe rabbitmqadmin.

Invoke rabbitmqadmin --help for usage instructions. You can:

  • list exchanges, queues, bindings, vhosts, users, permissions, connections and channels.

  • show overview information.

  • declare and delete exchanges, queues, bindings, vhosts, users and permissions.

  • publish and get messages.

  • close connections and purge queues.

  • import and export configuration.

Examples

/root/rabbitmqadmin  --help

Usage

=====

  rabbitmqadmin [options] subcommand

 

Options

=======

--help, -h              show this help message and exit

--config=CONFIG, -c CONFIG

                        configuration file [default: ~/.rabbitmqadmin.conf]

--node=NODE, -N NODE    node described in the configuration file [default:

                        'default' only if configuration file is specified]

--host=HOST, -H HOST    connect to host HOST [default: localhost]

--port=PORT, -P PORT    connect to port PORT [default: 15672]

--vhost=VHOST, -V VHOST

                        connect to vhost VHOST [default: all vhosts for list,

                        '/' for declare]

--username=USERNAME, -u USERNAME

                        connect using username USERNAME [default: guest]

--password=PASSWORD, -p PASSWORD

                        connect using password PASSWORD [default: guest]

--quiet, -q             suppress status messages [default: True]

--ssl, -s               connect with ssl [default: False]

--ssl-key-file=SSL_KEY_FILE

                        PEM format key file for SSL

--ssl-cert-file=SSL_CERT_FILE

                        PEM format certificate file for SSL

--format=FORMAT, -f FORMAT

                        format for listing commands - one of [raw_json, long,

                        pretty_json, kvp, tsv, table, bash] [default: table]

--sort=SORT, -S SORT    sort key for listing queries

--sort-reverse, -R      reverse the sort order

--depth=DEPTH, -d DEPTH

                        maximum depth to recurse for listing tables [default:

                        1]

--bash-completion       Print bash completion script [default: False]

--version               Display version and exit

 

More Help

=========

 

For more help use the help subcommand:

 

  rabbitmqadmin help subcommands  # For a list of available subcommands

  rabbitmqadmin help config       # For help with the configuration fil

 /root/rabbitmqadmin help subcommands

Usage

=====

  rabbitmqadmin [options] subcommand

 

  where subcommand is one of:

 

Display

=======

 

  list users [<column>...]

  list vhosts [<column>...]

  list connections [<column>...]

  list exchanges [<column>...]

  list bindings [<column>...]

  list permissions [<column>...]

  list channels [<column>...]

  list parameters [<column>...]

  list consumers [<column>...]

  list queues [<column>...]

  list policies [<column>...]

  list nodes [<column>...]

  show overview [<column>...]

 

Object Manipulation

===================

 

  declare queue name=... [node=... auto_delete=... durable=... arguments=...]

  declare vhost name=... [tracing=...]

  declare user name=... password=... tags=...

  declare exchange name=... type=... [auto_delete=... internal=... durable=... arguments=...]

  declare policy name=... pattern=... definition=... [priority=... apply-to=...]

  declare parameter component=... name=... value=...

  declare permission vhost=... user=... configure=... write=... read=...

  declare binding source=... destination=... [arguments=... routing_key=... destination_type=...]

  delete queue name=...

  delete vhost name=...

  delete user name=...

  delete exchange name=...

  delete policy name=...

  delete parameter component=... name=...

  delete permission vhost=... user=...

  delete binding source=... destination_type=... destination=... properties_key=...

  close connection name=...

  purge queue name=...

 

Broker Definitions

==================

 

  export <file>

  import <file>

 

Publishing and Consuming

========================

 

  publish routing_key=... [exchange=... payload=... payload_encoding=... properties=...]

  get queue=... [count=... requeue=... payload_file=... encoding=...]

 

  * If payload is not specified on publish, standard input is used

 

  * If payload_file is not specified on get, the payload will be shown on

    standard output along with the message metadata

 

  * If payload_file is specified on get, count must not be set

/root/rabbitmqadmin help config

Usage
=====
rabbitmqadmin [options] subcommand
Configuration File
==================
  It is possible to specify a configuration file from the command line.
  Hosts can be configured easily in a configuration file and called
  from the command line.
Example
=======
  # rabbitmqadmin.conf.example START
  [host_normal]
  hostname = localhost
  port = 15672
  username = guest
  password = guest
  declare_vhost = / # Used as default for declare / delete only
  vhost = /         # Used as default for declare / delete / list
  [host_ssl]
  hostname = otherhost
  port = 15672
  username = guest
  password = guest
  ssl = True
  ssl_key_file = /path/to/key.pem
  ssl_cert_file = /path/to/cert.pem
  # rabbitmqadmin.conf.example END
Use
===
  rabbitmqadmin -c rabbitmqadmin.conf.example -N host_normal ..

转载于:https://my.oschina.net/u/2326611/blog/665944

你可能感兴趣的文章
ORACLE 日期函数 MONTHS_BETWEEN
查看>>
struts2.3+spring3.2+hibernate4.2例子
查看>>
SecureCRT相关设置
查看>>
进程调度
查看>>
select count()和select count(1)的区别
查看>>
使用Struts+Hibernate开发学生信息管理系统
查看>>
Flume 1.7.0单机版安装
查看>>
C#代码实现上传文件到SharePoint文档库
查看>>
jquery
查看>>
基于SOAP的xml网络交互心得
查看>>
使用 CSS3 实现超炫的 Loading(加载)动画效果
查看>>
jQuery的搜索关键词自动匹配插件
查看>>
浅谈CSRF攻击方式
查看>>
按之字形打印二叉树
查看>>
android-android获取navigationview 上的控件id
查看>>
向Android社区贡献代码过程详解
查看>>
现代软件工程讲义 2 开发技术 - 效能分析
查看>>
重磅!美图技术团队发布开源 Ethereum DPoS 实现
查看>>
可能是最好用的安卓系统,MIUI是怎么研发的?今晚直播!
查看>>
“房间里的大象”暴露AI巨坑,AI视觉系统被夸嘘过头了?
查看>>