AMQP-DECLARE-QUEUE(1)
π AMQP-DECLARE-QUEUE(1) π
okay bestie, gather round, because this is amqp-declare-queue from the RabbitMQ C Client and she is so useful π°β¨
πΈ NAME πΈ
amqp-declare-queue β declare (create or assert the existence of) a queue on an AMQP server
π SYNOPSIS π
amqp-declare-queue [OPTION...] [-d] {-q queue name}
β¨ DESCRIPTION β¨
So like, amqp-declare-queue literally just tries to create a queue on an AMQP server, and then dips. That's it. That's the whole job. π
Here's the tea though: if you hand it the empty-string as the queue name, the server itself generates a fresh queue name and gives it right back to you. Not me getting a whole custom name from the server, we love a collaborative moment π
And in all cases β every single one β if the queue was successfully declared, the (raw binary) name of the queue gets printed to standard output, followed by a newline. raw binary fr fr, no pretty-printing, no vibes check, just the name.
π OPTIONS π
-q,--queue=queue nameβ the name of the queue you wanna declare. If you supply the empty string, the server generates a fresh queue name for you. (iconic, honestly)-d,--durableβ declares the queue with the"durable"flag set. Durable queues survive server restarts, bestie. They're the resilient ones. By default, though, queues are declared in"transient"mode β so if you don't pass this, your queue is giving temporary, here-for-a-good-time-not-a-long-time energy π
π¦ EXIT STATUS π¦
- If the queue was successfully declared β exit status
0. slay β¨ - If an error occurs β exit status
1. not slay π
π EXAMPLES π
Declare the durable queue βmyqueueβ, and display the name of the queue on standard output:
$ amqp-declare-queue -d -q myqueue
myqueue
Declare a fresh, server-named transient queue, and display the name of the queue on standard output (use amqp-delete-queue(1) to delete it from the server once you're done β don't just leave it there, be a good citizen π«Ά):
$ amqp-declare-queue -q ""
amq.gen-BW/wvociA8g6LFpb1PlqOA==
π SEE ALSO π
librabbitmq-tools(7) describes connection-related options common to all the RabbitMQ C Client tools. if you're confused about connections, that's your girl, go read her π
π AUTHOR π
The RabbitMQ Team <<info@rabbitmq.com>>
RabbitMQ C Client Β· 2026-10-13 Β· AMQP-DECLARE-QUEUE(1)
and that's the whole page bestie!! go declare some queues, stay durable, and remember: empty string in, server-generated name out πΈπβ¨π¦π
π¦ where this page comes from
- fedora 43: librabbitmq-tools 0.18.1-1.fc43 Β· MIT
- fedora 44: librabbitmq-tools 0.18.1-1.fc44 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms