Menu Search

5.7. Example of JSON 'Initial Configuration'

An example of the default 'Initial Configuration' JSON file the broker uses is provided below:

Example 5.1. JSON 'Initial configuration' File

{
  "name": "${broker.name}",
  "modelVersion": "7.0",
  "authenticationproviders" : [ {
    "name" : "passwordFile",
    "type" : "PlainPasswordFile",
    "path" : "${qpid.home_dir}${file.separator}etc${file.separator}passwd"
  } ],
    "brokerloggers" : [ {
    "name" : "logfile",
    "type" : "File",
    "fileName" : "${qpid.work_dir}${file.separator}log${file.separator}qpid.log",
    "brokerloginclusionrules" : [ {
      "name" : "Root",
      "type" : "NameAndLevel",
      "level" : "WARN",
      "loggerName" : "ROOT"
    }, {
      "name" : "Qpid",
      "type" : "NameAndLevel",
      "level" : "INFO",
      "loggerName" : "org.apache.qpid.*"
    }, {
      "name" : "Operational",
      "type" : "NameAndLevel",
      "level" : "INFO",
      "loggerName" : "qpid.message.*"
    }, {
      "name" : "Statistics",
      "type" : "NameAndLevel",
      "level" : "INFO",
      "loggerName" : "qpid.statistics.*"
    } ]
  }, {
    "name" : "memory",
    "type" : "Memory",
    "brokerloginclusionrules" : [ {
      "name" : "Root",
      "type" : "NameAndLevel",
      "level" : "WARN",
      "loggerName" : "ROOT"
    }, {
      "name" : "Qpid",
      "type" : "NameAndLevel",
      "level" : "INFO",
      "loggerName" : "org.apache.qpid.*"
    }, {
      "name" : "Operational",
      "type" : "NameAndLevel",
      "level" : "INFO",
      "loggerName" : "qpid.message.*"
    }, {
      "name" : "Statistics",
      "type" : "NameAndLevel",
      "level" : "INFO",
      "loggerName" : "qpid.statistics.*"
    } ]
  } ],
  "ports" : [  {
    "name" : "AMQP",
    "port" : "${qpid.amqp_port}",
    "authenticationProvider" : "passwordFile",
    "virtualhostaliases" : [ {
       "name" : "nameAlias",
       "type" : "nameAlias"
    }, {
        "name" : "defaultAlias",
        "type" : "defaultAlias"
    }, {
        "name" : "hostnameAlias",
        "type" : "hostnameAlias"
    } ]
  }, {
    "name" : "HTTP",
    "port" : "${qpid.http_port}",
    "authenticationProvider" : "passwordFile",
    "protocols" : [ "HTTP" ]
  }],
  "virtualhostnodes" : [ {
    "name" : "default",
    "type" : "JSON",
    "defaultVirtualHostNode" : "true",
    "virtualHostInitialConfiguration" : "\\${qpid.initial_config_virtualhost_config}"
  } ],
  "plugins" : [ {
    "type" : "MANAGEMENT-HTTP",
    "name" : "httpManagement"
  } ]
}

In the configuration above the following entries are stored:

  • Authentication Provider of type PlainPasswordFile with name "passwordFile".

  • Two Port entries: "AMQP", "HTTP"

  • Virtualhost Node called default. On initial startup, it virtualHostInitialConfiguration will cause a virtualhost to be created with the same name. The configuration will be stored in a JSON configuration store, the message data will be stored in a DERBY message store.

  • One management plugin: "httpManagement" of type "MANAGEMENT-HTTP".

  • Broker attributes are stored as a root entry.