summaryrefslogtreecommitdiff
path: root/content/xdocs/M2 - config.xml.html
blob: bd14dbe439b9db4540fc47bc5ead257b31443d99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<html>
    <head>
        <title>Apache Qpid : M2 - config.xml</title>
	    <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">	    
    </head>

    <body>
	    <table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
		    <tr>
			    <td valign="top" class="pagebody">
				    <div class="pageheader">
					    <span class="pagetitle">
                            Apache Qpid : M2 - config.xml
                                                    </span>
				    </div>
				    <div class="pagesubheading">
					    This page last changed on Apr 08, 2008 by <font color="#0050B2">ritchiem</font>.
				    </div>

				    <h2><a name="M2-config.xml-M2Brokerconfig.xmldetails"></a>M2 Broker config.xml details</h2>

<h3><a name="M2-config.xml-ChangesfromM1configuration"></a>Changes from M1 configuration</h3>


<h3><a name="M2-config.xml-FileFormat"></a>File Format</h3>
<p>This is an overview of the top level of the config file. Description of each section is embedded below. Each section is then described in detail in their own section.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>&lt;broker&gt;
&lt;!-- Various initial global definitions --&gt;
    &lt;connector&gt;
&lt;!-- Various connection information about the type connections the broker should listen for--&gt;
    &lt;management&gt;
&lt;!-- Enablement of management functionality --&gt;
    &lt;advanced&gt;
&lt;!-- Various advanced flags --&gt;
    &lt;security&gt;
&lt;!-- Definition of available security options --&gt;
    &lt;virtualhosts&gt;
&lt;!-- Definition of available virtual hosts --&gt;
    &lt;heartbeat&gt;
&lt;!-- Heartbeat configuration --&gt;
    &lt;queue&gt;
&lt;!-- General queue configuration options--&gt;
    &lt;virtualhosts&gt;
&lt;!-- Configuration of various virtual hosts. --&gt;
&lt;/broker&gt;

</pre>
</div></div>

<h2><a name="M2-config.xml-ConfigurationSectionsDetailedInformation"></a>Configuration Sections - Detailed Information</h2>

<p>The following sections provide an element by element overview of the config.xml.</p>

<h3><a name="M2-config.xml-Broker"></a>Broker</h3>

<p>The setting of the prefixes for QPID_HOME and QPID_WORK allows environment variables to be used throughout the config.xml and removes the need for hard coding of paths in this file.</p>

<p>See the <a href="Getting Started Guide.html" title="Getting Started Guide">Getting Started Guide</a> for more information on these variables.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>&lt;broker&gt;
    &lt;prefix&gt;${QPID_HOME}&lt;/prefix&gt;
    &lt;work&gt;${QPID_WORK}&lt;/work&gt;
    &lt;conf&gt;${prefix}/etc&lt;/conf&gt;
</pre>
</div></div>

<h3><a name="M2-config.xml-Connector"></a>Connector</h3>

<p>The connector section allows configuration of SSL and related keystore settings. By default this section is commented out and thus SSL is not enabled.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>&lt;connector&gt;
    &lt;!-- Uncomment out this block and edit the keystorePath and keystorePassword
         to enable SSL support
    &lt;ssl&gt;
        &lt;enabled&gt;true&lt;/enabled&gt;
        &lt;sslOnly&gt;true&lt;/sslOnly&gt;
        &lt;keystorePath&gt;/path/to/keystore.ks&lt;/keystorePath&gt;
        &lt;keystorePassword&gt;keystorepass&lt;/keystorePassword&gt;
    &lt;/ssl&gt;--&gt;
    &lt;qpidnio&gt;true&lt;/qpidnio&gt;
    &lt;transport&gt;nio&lt;/transport&gt;
    &lt;port&gt;5672&lt;/port&gt;
    &lt;sslport&gt;8672&lt;/sslport&gt;
    &lt;socketReceiveBuffer&gt;32768&lt;/socketReceiveBuffer&gt;
    &lt;socketSendBuffer&gt;32768&lt;/socketSendBuffer&gt;
&lt;/connector&gt;
</pre>
</div></div>

<h3><a name="M2-config.xml-Management"></a>Management</h3>

<p>This element allows the user to switch the connectivity of the management console on/off i.e. if the enabled tag is set to false you will not be able to connect a management console to this broker instance.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>&lt;management&gt;
    &lt;enabled&gt;true&lt;/enabled&gt;
&lt;/management&gt;
</pre>
</div></div>

<h3><a name="M2-config.xml-Advanced"></a>Advanced</h3>
<p>The elements in this section are used under the covers in the broker. At present, we do not recommend any changes to these settings.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>&lt;advanced&gt;
   &lt;filterchain enableExecutorPool="true"/&gt;
    &lt;enablePooledAllocator&gt;false&lt;/enablePooledAllocator&gt;
    &lt;enableDirectBuffers&gt;false&lt;/enableDirectBuffers&gt;
    &lt;framesize&gt;65535&lt;/framesize&gt;
    &lt;compressBufferOnQueue&gt;false&lt;/compressBufferOnQueue&gt;
&lt;/advanced&gt;
</pre>
</div></div>

<h3><a name="M2-config.xml-Security"></a>Security</h3>

<p>This section lists all the principal databases that are available for authentication and the default access control. The databases understand what SASL mechanisms can be used against their data and so are responsible for registering these SASL mechanisms. Currently we do not provide means of limiting these mechanisms.</p>
<div class="preformatted"><div class="preformattedContent">
<pre>&lt;security&gt;
    &lt;principal-databases&gt;
        &lt;principal-database&gt;
            &lt;!-- A name for referencing this database--&gt;
            &lt;name&gt;passwordfile&lt;/name&gt;
            &lt;!-- The type of principal database --&gt;
            &lt;class&gt;org.apache.qpid.server.security.auth.database.PlainPasswordVhostFilePrincipalDatabase&lt;/class&gt;
            &lt;!-- Any attributes associated with the database. Here it is a password file to load. --&gt;
            &lt;attributes&gt;
                &lt;attribute&gt;
                    &lt;name&gt;passwordFile&lt;/name&gt;
                    &lt;value&gt;${conf}/passwdVhost&lt;/value&gt;
                &lt;/attribute&gt;
            &lt;/attributes&gt;
        &lt;/principal-database&gt;
    &lt;/principal-databases&gt;
    &lt;!-- This access value can be any access manager. The built in defaults are AllowAll and DenyAll --&gt;
    &lt;access&gt;
        &lt;class&gt;org.apache.qpid.server.security.access.AllowAll&lt;/class&gt;
    &lt;/access&gt;
    &lt;!-- Properties required when running the JMX Management console. --&gt;
    &lt;jmx&gt;
       &lt;!-- Access file that allows users rights to access the management console. --&gt;
       &lt;access&gt;${conf}/jmxremote.access&lt;/access&gt;
       &lt;!-- The principal database to use to authenticate users. --&gt;
       &lt;principal-database&gt;passwordfile&lt;/principal-database&gt;
    &lt;/jmx&gt;        
&lt;/security&gt;
</pre>
</div></div>

<h3><a name="M2-config.xml-Virtualhosts"></a>Virtualhosts</h3>

<p>This section allows you to define the set of virtual hosts which will be contained in your broker instance, and the message store &amp; location for each. NB: The commented out section referencing BDBMessageStore should be used for all applications wishing to use persistence to disk. </p>

<p>If you are using transient messaging you can use the MemoryMessageStore, with the caveat that scalability for transient use is limited by heap size.</p>

<p>In our example config.xml, we define three virtual hosts which we commonly use for development (development), system testing (test) and integration testing (localhost). In the config.xml the per virtual host sections define both the Message Store in use (MemoryMessageStore for non-persistent applications or BDBMessageStore for persistent application usage) and the security for each virtual host. The security settings are under currently development so subject to changes.</p>

<p>The default virtual host for connections which do not specify a host on the url is 'test' in the example config.xml.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>&lt;virtualhost&gt;
            &lt;name&gt;localhost&lt;/name&gt;
            &lt;localhost&gt;
                &lt;store&gt;
                    &lt;!-- &lt;class&gt;org.apache.qpid.server.store.berkeleydb.BDBMessageStore&lt;/class&gt;
                    &lt;environment-path&gt;${work}/localhost-store&lt;/environment-path&gt; --&gt;

                    &lt;class&gt;org.apache.qpid.server.store.MemoryMessageStore&lt;/class&gt;
                &lt;/store&gt;

                &lt;security&gt;
                    &lt;!-- Need protocol changes to allow this--&gt;
                    &lt;authentication&gt;
                        &lt;name&gt;passwordfile&lt;/name&gt;
                        &lt;!-- Currently this can't be used as Vhost isn't specified at connection start only connection open --&gt;
                        &lt;mechanism&gt;PLAIN&lt;/mechanism&gt;
                    &lt;/authentication&gt;
                    &lt;access&gt;
                        &lt;class&gt;org.apache.qpid.server.security.access.PrincipalDatabaseAccessManager&lt;/class&gt;
                        &lt;attributes&gt;
                            &lt;attribute&gt;
                                &lt;name&gt;principalDatabase&lt;/name&gt;
                                &lt;value&gt;passwordfile&lt;/value&gt;
                            &lt;/attribute&gt;
                            &lt;attribute&gt;
                                &lt;name&gt;defaultAccessManager&lt;/name&gt;
                                &lt;value&gt;DenyAll&lt;/value&gt;
                            &lt;/attribute&gt;
                        &lt;/attributes&gt;
                    &lt;/access&gt;
                &lt;/security&gt;
            &lt;/localhost&gt;
        &lt;/virtualhost&gt;
</pre>
</div></div>

<h3><a name="M2-config.xml-Heartbeat"></a>Heartbeat</h3>

<p>The Qpid broker sends an internal (only) heartbeat. This element allows configuration of the frequency of this heartbeat. At present, we recommend that you leave this section unchanged !</p>

<div class="preformatted"><div class="preformattedContent">
<pre>&lt;heartbeat&gt;
    &lt;delay&gt;0&lt;/delay&gt;
    &lt;timeoutFactor&gt;2.0&lt;/timeoutFactor&gt;
&lt;/heartbeat&gt;
</pre>
</div></div>

<h3><a name="M2-config.xml-Queue"></a>Queue</h3>

<p>This should NOT be changed lightly as it sets the broker up to automatically bind queues to exchanges. </p>

<p>It could theoretically be used to prevent users creating new queues at runtime, assuming that you have created all queues/topics etc at broker startup. However, best advice is to leave unchanged for now.</p>

<div class="preformatted"><div class="preformattedContent">
<pre>&lt;queue&gt;
    &lt;auto_register&gt;true&lt;/auto_register&gt;
&lt;/queue&gt;
</pre>
</div></div>

<h3><a name="M2-config.xml-Virtualhosts"></a>Virtualhosts</h3>

<p>This element allows you to specify a location for the virtualhosts.xml file that you wish to use. If you are not using a subdirectory under $QPID_HOME you can provide a fully qualified path instead. For more information on the content of the virtualhosts.xml file please see <a href="Configure the Virtual Hosts via virtualhosts.xml.html" title="Configure the Virtual Hosts via virtualhosts.xml">Configure the Virtual Hosts via virtualhosts.xml</a></p>

<div class="preformatted"><div class="preformattedContent">
<pre>&lt;virtualhosts&gt;${conf}/virtualhosts.xml&lt;/virtualhosts&gt;
</pre>
</div></div>

				    
                    			    </td>
		    </tr>
	    </table>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td height="12" background="border/border_bottom.gif"><img src="border/spacer.gif" width="1" height="1" border="0"/></td>
			</tr>
		    <tr>
			    <td align="center"><font color="grey">Document generated by Confluence on Apr 22, 2008 02:47</font></td>
		    </tr>
	    </table>
    </body>
</html>