3

Is there a way to define a queue in a configuration file like in ActiveMQ :

http://activemq.apache.org/configure-startup-destinations.html

Sameera Jayaseckara
  • 457
  • 1
  • 6
  • 13

1 Answers1

11

Yes, it is possible.

The easiest way:

  1. Add queue manually, from webUI

By default webUI is exposed on port 15672. Add queue accessing http://localhost:15672/#/queues

  1. Export config file from webUI.

Access main page http://localhost:15672/#/. At the bottom you have section Import / export definitions, and button download broker definitions.

Just download the file and it will contain all defined queues.

Sample config file, with users, virtual host and queue: I have formatted the file using JStool plugin, JSFormat option from Notepad++. By default, file is single line and not very readable.

Next to 'download broker definitions' there is button 'upload broker definitions'. You may upload your file (it will work with pretty-formatted file).

{
    "rabbit_version" : "3.5.7",
    "users" : [{
            "name" : "guest",
            "password_hash" : "42234423423",
            "tags" : "administrator"
        }
    ],
    "vhosts" : [ {
            "name" : "/uat"
        }
    ],
    "permissions" : [{
            "user" : "guest",
            "vhost" : "/uat",
            "configure" : ".*",
            "write" : ".*",
            "read" : ".*"
    }
    ],
    "parameters" : [],
    "policies" : [],
    "queues" : [{
            "name" : "sms",
            "vhost" : "/uat",
            "durable" : false,
            "auto_delete" : false,
            "arguments" : {}
        }
    ],
    "exchanges" : [],
    "bindings" : []
}
Bartosz Bilicki
  • 12,599
  • 13
  • 71
  • 113