
This is the RabbitMQ Server Administrator's Guide. (Note: it is still under development. Please contact us if you have any suggestions or wished-for features!)
See also this list of new community tools have appeared for 'dashboard' access to core management functionality.
Please see the build and installation guides for instructions on compiling, installing, starting and shutting down the server. See the service guide for instructions on running the server as a Windows Service.
When the server first starts running, and detects that its database is uninitialised or has been deleted, it initialises a fresh database with the following resources:
/
guest with a default password of
guest, granted full access to the
/ virtual host.
It is advisable to change the
password of the guest user to something
private, particularly if your broker is accessible publicly.
rabbitmqctl is a command line tool for managing
a RabbitMQ broker.
For (much) more information on rabbitmqctl, please see
the rabbitmqctl(1) man page.
When an AMQP client establishes a connection to an AMQP server, it specifies a virtual host within which it intends to operate. A first level of access control is enforced at this point, with the server checking whether the user has any permissions to access the virtual hosts, and rejecting the connection attempt otherwise.
Resources, i.e. exchanges and queues, are named entities inside a particular virtual host; the same name denotes a different resource in each virtual host. A second level of access control is enforced when certain operations are performed on resources.
RabbitMQ distinguishes between configure, write and read operations on a resource. The configure operations create or destroy resources, or alter their behaviour. The write operations inject messages into a resource. And the read operations retrieve messages from a resource.
In order to perform an operation on a resource the user must have been granted the appropriate permissions for it. The following table shows what permissions on what type of resource are required for all the AMQP commands which perform permission checks.
| AMQP command | configure | write | read |
|---|---|---|---|
| exchange.declare | exchange | ||
| exchange.delete | exchange | ||
| queue.declare | queue | ||
| queue.delete | queue | ||
| queue.bind | queue | exchange | |
| basic.publish | exchange | ||
| basic.get | queue | ||
| basic.consume | queue | ||
| queue.purge | queue |
Permissions are expressed as a triple of regular expressions - one each for configure, write and read - on per-vhost basis. The user is granted the respective permission for operations on all resources with names matching the regular expressions. (Note: For convenience RabbitMQ maps AMQP's default exchange's blank name to 'amq.default' when performing permission checks.)
Some AMQP operations can create resources with server-generated names. By default, every user has configure, write and read permissions for such resources. The names are strong and not discoverable as part of the protocol, only through management functionality. Therefore, these resources are in effect private to the client that created them, unless their names are explicitly shared with other clients via some external mechanism.
Permissions have scope. Permissions with
client scope are enforced only for
client-specified names. As detailed above, operations with
server-generated names are allowed. Permissions with
all scope are enforced for all resources. In
this case, users must be explicitly granted permission to
'amq\.gen.*' if they are to use
server-generated resources. Similarly, grant no access
could simply be expressed as ''. Permissions
have client scope, by default.
NB. Due to a bug in RabbitMQ 2.0.0, all permissions are treated as having scope "all". This means that, in order for a client to use server generated names, it must explicitly be granted permission to 'amq\.gen.*'. Similarly, if a client intends to use the default exchange, it must be granted permission to 'amq\.default'.
The regular expression '^$', i.e. matching
nothing but the empty string, exactly covers resources with
server-generated names. That, for example, allows an
administrator to restrict a user to declaring private
resources only. The empty string, '' is a
synonym for '^$' and restricts permissions in the
exact same way.
RabbitMQ may cache the results of access control checks on a per-connection or per-channel basis. Hence changes to user permissions may only take effect when the user reconnects.
For details of how to set up access control, please see the Access Control section of the rabbitmqctl(1) man page.
RabbitMQ provides a plugin mechanism allowing for additional OTP applications to be run within the broker node. Plugins should not be seen as a general purpose mechanism for writing applications, but instead as a specialised tool when additional functionality is required at the broker level.
The RabbitMQ plugin mechanism makes use of a custom OTP .boot file, to start additional OTP applications within the broker node, and thus comes with a number of caveats:
rabbitmq-service.bat installcommand to ensure that the service configuration is updated to perform an appropriate boot sequence.
To remove an installed plugin from the broker, delete the .ez file or directory from the plugins directory. When the broker is restarted, the deleted plugin will no longer be started.
Note for users with RabbitMQ installed as a Windows Service: Just as for installation, every time you remove plugins from the plugins directory, you must re-run the
rabbitmq-service.bat installcommand to ensure that the service configuration is updated to perform an appropriate boot sequence.