blob: ef98a32e85b71ebc2defb5c35e18d263a0a828c2 [file] [log] [blame]
<div class="docbook"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">5.8. Virtualhost Initial Configuration</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="Java-Broker-Initial-Configuration-Example.html">Prev</a> </td><th width="60%" align="center">Chapter 5. Initial Configuration</th><td width="20%" align="right"> <a accesskey="n" href="Java-Broker-Management-Channel.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="Java-Broker-Virtual-Host-Initial-Configuration"></a>5.8. Virtualhost Initial Configuration</h2></div></div></div><p>
<span class="emphasis"><em>Virtualhost</em></span> initial configuration can be specified in <span class="emphasis"><em>Virtualhost node</em></span>
attribute <span class="emphasis"><em>virtualHostInitialConfiguration</em></span>. On first startup,
the <span class="emphasis"><em>virtualhost</em></span> is created based on provided initial configuration.
You can define there manageable <span class="emphasis"><em>Virtualhost</em></span> attributes and children like exchanges, queues, etc.
</p><p>
The attribute <code class="varname">virtualHostInitialConfiguration</code> can have a value of <span class="emphasis"><em>URL</em></span>
to an external resource where <span class="emphasis"><em>virtualhost</em></span> 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 <span class="emphasis"><em>URL</em></span>
to external resource or stringified json.
</p><div class="example"><a id="d0e1769"></a><p class="title"><strong>Example 5.2. Example of virtual host initial configuration provided as stringified JSON</strong></p><div class="example-contents"><pre class="programlisting">
...
"virtualhostnodes" : [ {
"name" : "default",
"type" : "JSON",
"defaultVirtualHostNode" : "true",
"virtualHostInitialConfiguration" : "{\"type\":\"BDB\",\"nodeAutoCreationPolicies\":[{\"patterns\":\".*\",\"createdOnPublish\":\"true\",\"createdOnConsume\":\"true\",\"nodeType\":\"queue\"}]}"
} ]
...</pre></div></div><br class="example-break" /><p>After creation of <span class="emphasis"><em>virtualhost</em></span> the value of
<code class="varname">virtualHostInitialConfiguration</code> is set to an empty string.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Java-Broker-Initial-Configuration-Example.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Java-Broker-Initial-Configuration.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="Java-Broker-Management-Channel.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">5.7. Example of JSON 'Initial Configuration' </td><td width="20%" align="center"><a accesskey="h" href="Apache-Qpid-Broker-J-Book.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 6. Management Channels</td></tr></table></div></div>