RABBITMQ-SERVICE.BAT(8)

๐Ÿ“ฆ
version 4.3.7 ยท 3 versions
, in alpine 3.24, arch rolling, nixpkgs unstable

๐Ÿ‡โœจ rabbitmq-service.bat โ€” the manual (yes, the whole thing)

So like, this is the page for rabbitmq-service.bat, from the System Manager's Manual, section 8. Bestie. Sit down. We're learning Windows service management today and honestly? It's giving useful. ๐Ÿ’…


๐Ÿ’– NAME ๐Ÿ’–

rabbitmq-service.bat โ€” the tool for managing the RabbitMQ Windows service. That's it. That's the vibe. ๐ŸŽ€


๐ŸŒธ SYNOPSIS ๐ŸŒธ

rabbitmq-service.bat [command]

One optional command. That's the whole interfacing situation, no cap. โœจ


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

RabbitMQ is an open source multi-protocol messaging broker. Iconic. Legendary. We stan. ๐Ÿ’œ

So here's the thing: running rabbitmq-service.bat lets the RabbitMQ broker run as a service in Windowsยฎ environments. And like โ€” the RabbitMQ broker service can be started and stopped using the Windowsยฎ services panel. That's the whole main character move. ๐Ÿ‘‘

Now the important-ish part, lowkey the plot twist: by default the service runs in the authentication context of the local system account. Which means โ€” and listen, because this is the part people forget โ€” it is therefore necessary to synchronise Erlang cookies between the local system account (typically C:\Windows\.erlang.cookie) and the account that will be used to run rabbitmqctl(8). Like, both sides gotta have the matching cookie. It's a whole thing. ๐Ÿ˜ญ


โญ COMMANDS โญ

Okay these are the actual commands, one bullet each, no skipping, we're eating the whole plate:

  • help โ€” Display usage information. Baby's first command, literally. ๐Ÿผ
  • install โ€” Install the service. The service will not be started. Note that subsequent invocations will update the service parameters if relevant environment variables were modified. So re-running it isn't a "oops I broke it" moment โ€” it's a refresh. Slay. ๐Ÿ”ฅ
  • remove โ€” Remove the service. If the service is running then it will automatically be stopped before being removed. And here's the reassuring bit: no files will be deleted as a consequence and rabbitmq-server(8) will remain operable. Your stuff is safe, bestie. ๐Ÿซถ
  • start โ€” Start the service. The service must have been correctly installed beforehand. Like, you can't start what isn't there. ๐Ÿ™ˆ
  • stop โ€” Stop the service. The service must be running for this command to have any effect. (No running service = no effect. It's not mad at you, it just does nothing.) ๐Ÿ’€
  • disable โ€” Disable the service. This is the equivalent of setting the startup type to Disabled using the service control panel. Exact same energy, just from the command line. ๐Ÿ’…
  • enable โ€” Enable the service. This is the equivalent of setting the startup type to Automatic using the service control panel. โœจ

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

These are the env vars, and honestly each one is a little personality trait:

  • RABBITMQ_SERVICENAME โ€” Defaults to RabbitMQ. It's the name of the service. Name era. ๐ŸŽ€
  • RABBITMQ_BASE โ€” Note: Windows only. Defaults to the application data directory of the current user. This is the location of log and database directories. So that's where all your little files live. ๐Ÿ—‚๏ธ
  • RABBITMQ_NODENAME โ€” Defaults to "rabbit@" followed by the computed hostname. Can be used to run multiple nodes on the same host. Every node in a cluster must have a unique RABBITMQ_NODENAME โ€” like, that's non-negotiable, don't name two of your children the same thing. To learn more, see the RabbitMQ Clustering guide: https://www.rabbitmq.com/docs/clustering ๐Ÿ‘ฏ
  • RABBITMQ_NODE_IP_ADDRESS โ€” By default RabbitMQ will bind to all IPv6 and IPv4 interfaces available. This variable limits the node to one network interface or address family. So it's the "actually, just this one please" knob. To learn more, see the RabbitMQ Networking guide: https://www.rabbitmq.com/docs/networking ๐Ÿ•ธ๏ธ
  • RABBITMQ_NODE_PORT โ€” AMQP 0-9-1 and AMQP 1.0 port. Defaults to 5672. To learn more, see the RabbitMQ Networking guide: https://www.rabbitmq.com/docs/networking ๐Ÿ”Œ
  • ERLANG_SERVICE_MANAGER_PATH โ€” Defaults to C:\Program Files\erl{version}\erts-{version}\bin (or C:\Program Files (x86)\erl{version}\erts-{version}\bin for 64-bit environments). This is the installation location of the Erlang service manager. Copy it exactly, don't eyeball it. ๐Ÿ“
  • RABBITMQ_CONSOLE_LOG โ€” Set this variable to new or reuse to have the console output from the server redirected to a file named SERVICENAME.debug in the application data directory of the user that installed the service. Under Vista this will be C:\Users\AppData\username\SERVICENAME. Under previous versions of Windows this will be C:\Documents and Settings\username\Application Data\SERVICENAME. If RABBITMQ_CONSOLE_LOG is set to new then a new file will be created each time the service starts. If RABBITMQ_CONSOLE_LOG is set to reuse then the file will be overwritten each time the service starts. The default behaviour when RABBITMQ_CONSOLE_LOG is not set or set to a value other than new or reuse is to discard the server output. ๐Ÿ—‘๏ธ
Okay real talk for a sec: if you don't set RABBITMQ_CONSOLE_LOG (or you set it to literally anything that isn't new or reuse), the server output just gets thrown away. Gone. Discarded. So if you're like "where are my logs bestie ๐Ÿ˜ญ" โ€” that's why. Set it to new or reuse on purpose.

๐Ÿงš SEE ALSO ๐Ÿงš

The whole friend group, all eight of them, every single one:

rabbitmqctl(8), rabbitmq-diagnostics(8), rabbitmq-plugins(8), rabbitmq-server(8), rabbitmq-queues(8), rabbitmq-streams(8), rabbitmq-upgrade(8), rabbitmq-env.conf(5)


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

The RabbitMQ Team <contact-tanzu-data.pdl@broadcom.com> โ€” absolute icons, we love them, mwah. ๐Ÿ’–


And that's the page!! ๐ŸŒŸ This was RabbitMQ Server (that's the source/version vibe, bestie), dated June 22, 2023 โ€” so go forth and service-manage responsibly. Bye bestie, ily, go slay some Windows services ๐Ÿ’…โœจ๐Ÿ‡

๐Ÿ“ฆ where this page comes from