<p>I need to create a RabbitMQ queue from command line.</p>
<ol>
<li>I have a RabbitMQ setup in kubernetes.</li>
<li>I login into a RabbitMQ pod and fetch the rabbitmqadmin for my version 3.8.14</li>
<li>I run this:</li>
</ol>
<p><code>./rabbitmqadmin -u user1 -p password1 -N rabbit@rabbitmq-0.rabbitmq.default.svc.cluster.local declare queue name=CompName.Player1</code></p>
<p>But instead of adding the queue I get:</p>
<p>**<strong>Not found: /api/queues/%2F/CompName.Player1</strong></p>
<p>I tried these but had no success, also the rabbitmq log shows no events when running these rabbitmqadmin commands:</p>
<p><code> ./rabbitmqadmin declare queue name=Test1</code></p>
<p><code>./rabbitmqadmin -u user1 -p password1 declare queue name=CompName.Player1</code></p>
<p><code>curl -i -u user1:password1 -H &quot;content-type:application/json&quot; -XPUT -d'{&quot;durable&quot;:true}' http://localhost:15672/api/queues/%2f/CompName.Player1</code></p>
<p>Adding the queue manually via management web UI works but it's not an option for a kubernetes solution.</p>

<p>I got it. I think at some point the API endpoint got updated so all calls must go to http://localhost:15672/rabbitmq/api. Here's the configuration line that was added that caused the issues:</p>
<pre><code>management.path_prefix = /rabbitmq
</code></pre>
<p>Here are the working examples:</p>
<p><code>./rabbitmqadmin -u user1 -p password1 --path-prefix=http://localhost:15672/rabbitmq declare queue name=CompName.Player1</code></p>
<p><code>curl -i -u user1:password1 -H &quot;content-type:application/json&quot; -XPUT -d'{&quot;durable&quot;:true}' http://localhost:15672/rabbitmq/api/queues/%2f/CompName.Player1</code></p>
<p>Also this worked:</p>
<pre><code>import pika
import sys
connection = pika.BlockingConnection(
    pika.ConnectionParameters(host='localhost'))
channel = connection.channel()
channel.queue_declare(queue='CompName.Player1', durable=True)
connection.close()```
</code></pre>
