Menu Search

5.8. Virtualhost Initial Configuration

Virtualhost initial configuration can be specified in Virtualhost node attribute virtualHostInitialConfiguration. On first startup, the virtualhost is created based on provided initial configuration. You can define there manageable Virtualhost attributes and children like exchanges, queues, etc.

The attribute virtualHostInitialConfiguration can have a value of URL to an external resource where virtualhost initial configuration is provided in json format, or, it can hold a string value with initial configuration in stringified json format. If required, you can specify initial configuration as context variable which can be resolved as URL to external resource or stringified json.

Example 5.2. Example of virtual host initial configuration provided as stringified JSON

            "virtualhostnodes" : [ {
            "name" : "default",
            "type" : "JSON",
            "defaultVirtualHostNode" : "true",
            "virtualHostInitialConfiguration" : "{\"type\":\"BDB\",\"nodeAutoCreationPolicies\":[{\"patterns\":\".*\",\"createdOnPublish\":\"true\",\"createdOnConsume\":\"true\",\"nodeType\":\"queue\"}]}"
            } ]

After creation of virtualhost the value of virtualHostInitialConfiguration is set to an empty string.