title: RabbitMQ loading users from property file
body: <p>Using <a href="https://stackoverflow.com/questions/21414364/loading-rabbitmq-config-at-startup">this question</a> as inspiration, I'm attempting to load rabbitMQ configuration from file on initial start-up, since this will be ran in a docker container.</p>
  
  <p>Using the Docker RabbitMQ image, I'm starting with the following command:</p>
  
  <pre><code>docker run -d -h rabbit-host --name rabbit-queue -v /opt/docker/rabbit/mnesia:/var/lib/rabbitmq/mnesia -v /opt/docker/rabbit/config:/etc/rabbitmq -v /opt/docker/log/rabbit:/var/lib/rabbitmq/log -p 5672:5672 -p 15672:15672 -e RABBITMQ_LOG_BASE=/var/lib/rabbitmq/log rabbitmq:3.5-management
  </code></pre>
  
  <p>There are two files located at /opt/docker/rabbit/config that are attached to the docker window. </p>
  
  <p><strong>rabbitmq.config</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>[
          {rabbitmq_management, [
                  {load_definitions, "/etc/rabbitmq/definitions.json"}
                  ]
          }
  ].</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>definitions.json</strong> (Exported from a known good configuration's admin console)</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{"rabbit_version": "3.5.0",
    "users": [
      {
        "name": "g",
        "password_hash": "xxx",
        "tags": "administrator"
      },
      {
        "name": "a",
        "password_hash": "xxx=",
        "tags": "administrator"
      },
      {
        "name": "t",
        "password_hash": "xxx=",
        "tags": ""
      },
      {
        "name": "b",
        "password_hash": "xxx=",
        "tags": "administrator"
      },
      {
        "name": "j",
        "password_hash": "\/xxx\/Wet8=",
        "tags": "administrator"
      },
      {
        "name": "g",
        "password_hash": "xxx+IJRpR3Bh4=",
        "tags": "administrator"
      },
      {
        "name": "j",
        "password_hash": "0Qlvj0o+xxx+xxx=",
        "tags": "administrator"
      }
    ],
    "vhosts": [
      {
        "name": "\/"
      }
    ],
    "permissions": [
      {
        "user": "guest",
        "vhost": "\/",
        "configure": ".*",
        "write": ".*",
        "read": ".*"
      },
      {
        "user": "j",
        "vhost": "\/",
        "configure": ".*",
        "write": ".*",
        "read": ".*"
      },
      {
        "user": "a",
        "vhost": "\/",
        "configure": ".*",
        "write": ".*",
        "read": ".*"
      },
      {
        "user": "g",
        "vhost": "\/",
        "configure": ".*",
        "write": ".*",
        "read": ".*"
      },
      {
        "user": "t",
        "vhost": "\/",
        "configure": ".*",
        "write": ".*",
        "read": ".*"
      },
      {
        "user": "j",
        "vhost": "\/",
        "configure": ".*",
        "write": ".*",
        "read": ".*"
      },
      {
        "user": "b",
        "vhost": "\/",
        "configure": ".*",
        "write": ".*",
        "read": ".*"
      }
    ],
    "parameters": [
  
    ],
    "policies": [
  
    ],
    "queues": [
      {
        "name": "auditLogQueue",
        "vhost": "\/",
        "durable": true,
        "auto_delete": false,
        "arguments": {
  
        }
      },
      {
        "name": "auditlog.gw.local",
        "vhost": "\/",
        "durable": true,
        "auto_delete": false,
        "arguments": {
  
        }
      }
    ],
    "exchanges": [
      {
        "name": "spring-boot-exchange",
        "vhost": "\/",
        "type": "topic",
        "durable": true,
        "auto_delete": false,
        "internal": false,
        "arguments": {
  
        }
      }
    ],
    "bindings": [
  
    ]
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here's what I see on startup:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>              RabbitMQ 3.5.0. Copyright (C) 2007-2014 GoPivotal, Inc.
    ##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
    ##  ##
    ##########  Logs: tty
    ######  ##        /var/lib/rabbitmq/log/rabbit@rabbit-host-sasl.log
    ##########
                Starting broker...
  =INFO REPORT==== 15-Apr-2015::22:01:52 ===
  Starting RabbitMQ 3.5.0 on Erlang 17.4
  Copyright (C) 2007-2014 GoPivotal, Inc.
  Licensed under the MPL.  See http://www.rabbitmq.com/
  
  =INFO REPORT==== 15-Apr-2015::22:01:52 ===
  node           : rabbit@rabbit-host
  home dir       : /var/lib/rabbitmq
  config file(s) : /etc/rabbitmq/rabbitmq.config
  cookie hash    : jbD/nyBuT4vYLbfKO4tc3g==
  log            : tty
  sasl log       : /var/lib/rabbitmq/log/rabbit@rabbit-host-sasl.log
  database dir   : /var/lib/rabbitmq/mnesia/rabbit@rabbit-host
  
  =INFO REPORT==== 15-Apr-2015::22:01:54 ===
  Limiting to approx 524188 file handles (471767 sockets)
  
  =INFO REPORT==== 15-Apr-2015::22:01:54 ===
      application: mnesia
      exited: stopped
      type: temporary
  
  =INFO REPORT==== 15-Apr-2015::22:01:54 ===
  Priority queues enabled, real BQ is rabbit_variable_queue
  
  =INFO REPORT==== 15-Apr-2015::22:01:55 ===
  Memory limit set to 3191MB of 7978MB total.
  
  =INFO REPORT==== 15-Apr-2015::22:01:57 ===
  Disk free limit set to 50MB
  
  =INFO REPORT==== 15-Apr-2015::22:01:58 ===
  Adding vhost '/'
  
  =INFO REPORT==== 15-Apr-2015::22:01:58 ===
  Creating user 'guest'
  
  =INFO REPORT==== 15-Apr-2015::22:01:58 ===
  Setting user tags for user 'guest' to [administrator]
  
  =INFO REPORT==== 15-Apr-2015::22:01:58 ===
  Setting permissions for 'guest' in '/' to '.*', '.*', '.*'
  
  =INFO REPORT==== 15-Apr-2015::22:01:58 ===
  msg_store_transient: using rabbit_msg_store_ets_index to provide index
  
  =INFO REPORT==== 15-Apr-2015::22:01:58 ===
  msg_store_persistent: using rabbit_msg_store_ets_index to provide index
  
  =WARNING REPORT==== 15-Apr-2015::22:01:58 ===
  msg_store_persistent: rebuilding indices from scratch
  
  =INFO REPORT==== 15-Apr-2015::22:01:58 ===
  started TCP Listener on [::]:5672
   completed with 0 plugins.
  
  =INFO REPORT==== 15-Apr-2015::22:01:58 ===
  Server startup complete; 0 plugins started.</code></pre>
  </div>
  </div>
  </p>
  
  <p>At the very least, Rabbit is attempting to read the rabbit.config, as it will throw an error if it's not. But, rabbit isn't picking up the definitions.json, and goes on to create the standard 'guest' user. Any suggestions to what the problem is? Or, any alternatives to loading users and queue names on startup?</p>