This article is a mirror article of machine translation, please click here to jump to the original article.

View: 14435|Reply: 1

【Practice】rabbitMQ console to add account information

[Copy link]
Posted on 4/8/2018 9:55:34 PM | | | |
RabbitMQ is a popular open-source message queuing system, a standard implementation of AMQP (Advanced Message Queuing Protocol), developed in erlang. RabbitMQ is said to have good performance and timeliness, and can also support cluster and workload deployment very well, making it ideal for use in large-scale distributed systems, and the specific characteristics are still being verified and tested.

【Practical Combat】RabbitMQ installation tutorial under Windows
http://www.itsvse.com/thread-4630-1-1.html
(Source: Architect_Programmer)
【Practice】RabbitMQ installs the web management plugin
http://www.itsvse.com/thread-4631-1-1.html
(Source: Architect_Programmer)
【Actual Combat】Error: unable to perform an operation on node 'rabbit'. Pleas...
http://www.itsvse.com/thread-4632-1-1.html
(Source: Architect_Programmer)

RabbitMQ provides an administrative tool called rabbitmqctl, which is located under the RabbitMQ installation directory sbin for rabbitmqctl.bat Windows.

Execute the command as follows:

After the operation is completed, we can take a look at it through the web interface, as shown in the figure below:



There are 5 types of user permissions, as follows:

(1) Super administrator

You can log in to the management console (with the management plugin enabled) to view all the information and take action on users and policies.

(2) Monitoring

You can log in to the management console (with the management plugin enabled) and view information about the rabbitmq node (number of processes, memory usage, disk usage, etc.)

(3) Policymaker

You can log in to the management console (with the management plugin enabled) and manage policies.

(4) Management

You can only log in to the management console (with the management plugin enabled), but you cannot see the node information or manage the policies.

(5) Others

Unable to log in to the management console, it is usually ordinary producers and consumers.


The default "guest" user is only allowed to access locally, and other accounts are not restricted.

At first, when I used the .net client to connect to the remote rabbitmq, the error was as follows:

Unhandled exceptions: RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable ---> RabbitMQ.Client.Exceptions.AuthenticationFailureException: ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN. For details see the broker logfile.



If the client does not set any username and password, the default account and password of the client are guest!

To allow "guest" remote access, you need to add the following options to the configuration file:

C:\Users\Administrator\AppData\Roaming\RabbitMQ\rabbitmq.config



Note:No user roles are set and do not affect the sending and receiving of messagesThe picture below is my new itsvse user, and I have not set the user's role, so I can send and receive messages normally!






Previous:Windows Creation XMR Monero Wallet Tutorial
Next:Exception message: "StrongTypingException: IsPrima...
 Landlord| Posted on 4/8/2018 9:56:58 PM |
The rabbitmqctl parameter command is as follows:

Usage:
rabbitmqctl [-n <node>] [-t <timeout>] [-l] [-q] <command> [<command options>]

General options:
    -n node
    -q quiet
    -t timeout
    -l longnames

Default node is "rabbit@server", where `server` is the local hostname. On a host
named "server.example.com", the node name of the RabbitMQ Erlang node will
usually be rabbit@server (unless RABBITMQ_NODENAME has been set to some
non-default value at broker startup time). The output of hostname -s is usually
the correct suffix to use after the "@" sign. See rabbitmq-server(1) for
details of configuring the RabbitMQ broker.

Quiet output mode is selected with the "-q" flag. Informational messages are
suppressed when quiet mode is in effect.

Operation timeout in seconds. Only applicable to "list" commands. Default is
"infinity".

If RabbitMQ broker uses long node names for erlang distribution, "longnames"
option should be specified.

Some commands accept an optional virtual host parameter for which
to display results. The default value is "/".

Commands:
    add_user <username> <password>
    add_vhost <vhost>
    authenticate_user <username> <password>
    cancel_sync_queue [-p <vhost>] queue
    change_cluster_node_type <disc|ram>
    change_password <username> <password>
    clear_global_parameter <key>
    clear_operator_policy [-p <vhost>] <key>
    clear_parameter [-p <vhost>] <component_name> <key>
    clear_password <username>
    clear_permissions [-p vhost] <username>
    clear_policy [-p <vhost>] <key>
    clear_topic_permissions [-p vhost] <username> [<exchange>]
    clear_vhost_limits [-p <vhost>]
    close_all_connections [-p <vhost> --limit <limit>] [-n <node> --global] [--per-connection-delay <delay>] <explanation>
    close_connection <connectionpid> <explanation>
    cluster_status
    decode value passphrase [--cipher cipher] [--hash hash] [--iterations iterations]
    delete_queue queue_name [--if_empty|-e] [--if_unused|-u]
    delete_user <username>
    delete_vhost <vhost>
    encode value passphrase [--cipher cipher] [--hash hash] [--iterations iterations]
    environment
    eval <expr>
    exec <expr> [--offline]
    force_boot
    force_reset
    forget_cluster_node [--offline] <existing_cluster_member_node>
    help <command>
    hipe_compile <directory>
    join_cluster [--disc|--ram] <existing_cluster_member_node>
    list_bindings [-p <vhost>] [<bindinginfoitem> ...]
    list_channels [<channelinfoitem> ...]
    list_ciphers
    list_connections [<connectioninfoitem> ...]
    list_consumers [-p vhost] [<consumerinfoitem> ...]
    list_exchanges [-p <vhost>] [<exchangeinfoitem> ...]
    list_global_parameters
    list_hashes
    list_operator_policies [-p <vhost>]
    list_parameters [-p <vhost>]
    list_permissions [-p <vhost>]
    list_policies [-p <vhost>]
    list_queues [-p <vhost>] [--online] [--offline] [--local] [<queueinfoitem> ...]
    list_topic_permissions [-p <vhost>]
    list_unresponsive_queues [--local] [--queue-timeout <queue-timeout>] [<unresponsiveq_ueueinfoitem> ...]
    list_user_permissions <username>
    list_user_topic_permissions <username>
    list_users
    list_vhost_limits [-p <vhost>] [--global]
    list_vhosts [<vhostinfoitem> ...]
    node_health_check
    purge_queue <queue>
    rename_cluster_node <oldnode1> <newnode1> [oldnode2] [newnode2] ...
    report
    reset
    restart_vhost [-p <vhost>]
    rotate_logs
    set_cluster_name <name>
    set_disk_free_limit <disk_limit>
set_disk_free_limit mem_relative <fraction>
    set_global_parameter <name> <value>
    set_operator_policy [-p <vhost>] [--priority <priority>] [--apply-to <apply-to>] <name> <pattern>  <definition>
    set_parameter [-p <vhost>] <component_name> <name> <value>
    set_permissions [-p <vhost>] <username> <conf> <write> <read>
    set_policy [-p <vhost>] [--priority <priority>] [--apply-to <apply-to>] <name> <pattern>  <definition>
    set_topic_permissions [-p <vhost>] <username> <exchange> <write_pattern> <read_pattern>
    set_user_tags <username> <tag> [...]
    set_vhost_limits [-p <vhost>] <definition>
    set_vm_memory_high_watermark <fraction>
    set_vm_memory_high_watermark absolute <value>
    shutdown
    start_app
    status
    stop [<pidfile>]
    stop_app
    sync_queue [-p <vhost>] queue
    trace_off [-p <vhost>]
    trace_on [-p <vhost>]
    update_cluster_nodes <existing_cluster_member_node_to_seed_from>
    wait [<pid_file>] [--pid|-P <pid>]
<queueinfoitem> must be a member of the list [name, durable, auto_delete, arguments, policy, pid, owner_pid, exclusive, exclusive_consumer_pid, exclusive_consumer_tag, messages_ready, messages_unacknowledged, messages, messages_ready_ram, messages_unacknowledged_ram, messages_ram, messages_persistent, message_bytes, message_bytes_ready, message_bytes_ unacknowledged, message_bytes_ram, message_bytes_persistent, head_message_timestamp, disk_reads, disk_writes, consumers, consumer_utilisation, memory, slave_pids, synchronised_ slave_pids, state].

<bindinginfoitem> must be a member of the list [source_name, source_kind, destination_name, destination_kind, routing_key, arguments].

<connectioninfoitem> must be a member of the list [pid, name, port, host, peer_port, peer_host, ssl, ssl_protocol, ssl_key_exchange, ssl_cipher, ssl_hash, peer_cert_subject, peer_cert_ issuer, peer_cert_validity, state, channels, protocol, auth_mechanism, user, vhost, timeout, frame_max, channel_max, client_properties, recv_oct, recv_cnt, send_oct, send_cnt, send_ pend, connected_at].

<channelinfoitem> must be a member of the list [pid, connection, name, number, user, vhost, transactional, confirm, consumer_count, messages_unacknowledged, messages_uncommitted, acks_ uncommitted, messages_unconfirmed, prefetch_count, global_prefetch_count].

<exchangeinfoitem> must be a member of the list [name, type, durable, auto_delete, internal, arguments, policy].

<vhostinfoitem> must be a member of the list [name, tracing, cluster_state].

<consumerinfoitem> must be a member of the list [queue_name, channel_pid, consumer_tag, ack_required, prefetch_count, arguments].

<unresponsive_queueinfoitem> must be a member of the list [name, durable, auto_delete, arguments, pid, recoverable_slaves].


Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com