You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Tom Jordahl <tj...@adobe.com.INVALID> on 2019/04/26 20:43:38 UTC

Configuring nodeAutoCreationPolicies for an BDB_HA cluster from json

Hello,

I am configuring Qpid in a HA configuration (BDB_HA) via a Chef recipe, so I am using the {qpid.work_dir}/config.json file to create the initial configuration when Qpid starts up.

I would like the following Node Creation Policy to be configured in my Virtual Host, but when I add it to the config, it seems to be ignored.  I tried putting the entry in the broker configuration (i.e. right below the "name" entry in the top level config) and after using the REST API to get the virtual host config on a hand configured server, I moved it in to the virtualhostnodes config itself.

"nodeAutoCreationPolicies": [
  {
    "pattern": ".*",
    "nodeType": "Queue",
    "attributes": {
      "durable": "true",
      "maximumMessageTtl": "3600000",
      "messageDurability": "ALWAYS",
      "messageGroupType": "STANDARD"
    },
    "createdOnPublish": "true",
    "createdOnConsume": "true"
  }
]

I have included my complete config.json file below for reference.

Thanks for any help on where to put this config!
--
Tom Jordahl



{
  "name": "${broker.name}",
  "modelVersion": "7.1",
  "authenticationproviders": [
    {
      "name": "anonymous",
      "type": "Anonymous"
    },
    {
      "name": "plain",
      "type": "Plain",
      "users": [
        {
          "name": "admin",
          "type": "managed",
          "password": "love2fax"
        },
        {
          "name": "web",
          "type": "managed",
          "password": "love2fax"
        }
      ]
    }
  ],
  "brokerloggers": [
    {
      "name": "logfile",
      "type": "File",
      "durable": true,
      "compressOldFiles": true,
      "fileName": "${qpid.work_dir}${file.separator}log${file.separator}qpid.log",
      "maxFileSize": "100",
      "maxHistory": 7,
      "rollDaily": true,
      "rollOnRestart": true,
      "virtualHostLogEventExcluded": false,
      "brokerloginclusionrules": [
        {
          "name": "Operational",
          "type": "NameAndLevel",
          "level": "INFO",
          "loggerName": "qpid.message.*"
        },
        {
          "name": "Qpid",
          "type": "NameAndLevel",
          "level": "INFO",
          "loggerName": "org.apache.qpid.*"
        },
        {
          "name": "Root",
          "type": "NameAndLevel",
          "level": "WARN",
          "loggerName": "ROOT"
        },
        {
          "name": "Statistics",
          "type": "NameAndLevel",
          "level": "INFO",
          "loggerName": "qpid.statistics.*"
        }
      ]
    },
    {
      "name": "memory",
      "type": "Memory",
      "brokerloginclusionrules": [
        {
          "name": "Operational",
          "type": "NameAndLevel",
          "level": "INFO",
          "loggerName": "qpid.message.*"
        },
        {
          "name": "Qpid",
          "type": "NameAndLevel",
          "level": "INFO",
          "loggerName": "org.apache.qpid.*"
        },
        {
          "name": "Root",
          "type": "NameAndLevel",
          "level": "WARN",
          "loggerName": "ROOT"
        },
        {
          "name": "Statistics",
          "type": "NameAndLevel",
          "level": "INFO",
          "loggerName": "qpid.statistics.*"
        }
      ]
    }
  ],
  "plugins": [
    {
      "type": "MANAGEMENT-HTTP",
      "name": "httpManagement"
    }
  ],
  "ports": [
    {
      "name": "AMQP",
      "port": "${qpid.amqp_port}",
      "authenticationProvider": "anonymous",
      "virtualhostaliases": [
        {
          "name": "defaultAlias",
          "type": "defaultAlias"
        },
        {
          "name": "hostnameAlias",
          "type": "hostnameAlias"
        },
        {
          "name": "nameAlias",
          "type": "nameAlias"
        }
      ]
    },
    {
      "name": "HTTP",
      "type": "HTTP",
      "authenticationProvider": "anonymous",
      "port": "${qpid.http_port}",
      "protocols": [
        "HTTP"
      ]
    }
  ],
  "virtualhostnodes": [
    {
      "nodeAutoCreationPolicies": [
        {
          "pattern": ".*",
          "nodeType": "Queue",
          "attributes": {
            "durable": "true",
            "maximumMessageTtl": "3600000",
            "messageDurability": "ALWAYS",
            "messageGroupType": "STANDARD"
          },
          "createdOnPublish": "true",
          "createdOnConsume": "true"
        }
      ],
      "name": "qpid1",
      "type": "BDB_HA",
      "desiredState": "ACTIVE",
      "durable": "true",
      "context": {},
      "address": "qpid1:5700",
      "defaultVirtualHostNode": true,
      "designatedPrimary": false,
      "groupName": "AdobeSign",
      "helperAddress": "qpid1:5700]%>",
      "permittedNodes": [
        "qpid1:5700,qpid2:5700,qpid3:5700"
      ],
      "priority": "1",
      "quorumOverride": "1",
      "virtualHostInitialConfiguration": "{\"type\":\"BDB_HA\",\"context\":{},\"name\":\"qpid1\"}"
    }
  ]
}