blob: 4495d766b4a38b45b6a10483bb99aed161b13fce [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<link href="http://activemq.apache.org/styles/site.css" rel="stylesheet" type="text/css"/>
<link href="http://activemq.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css"/>
<script src="http://activemq.apache.org/styles/prototype.js" type="text/javascript"></script>
<script src="http://activemq.apache.org/styles/rico.js" type="text/javascript"></script>
<script src="http://activemq.apache.org/styles/site.js" type="text/javascript"></script>
<style type="text/css">
.maincontent { overflow:hidden; }
</style>
<!--[if IE]>
<style type="text/css">
.maincontent { width:100%; }
</style>
<![endif]-->
<link href='http://activemq.apache.org/styles/highlighter/styles/shCore.css' rel='stylesheet' type='text/css' />
<link href='http://activemq.apache.org/styles/highlighter/styles/shThemeEclipse.css' rel='stylesheet' type='text/css' />
<script src='http://activemq.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
<script src='http://activemq.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
<script type="text/javascript">
SyntaxHighlighter.defaults['toolbar'] = false;
SyntaxHighlighter.all();
</script>
<title>
Apache ActiveMQ &#8482; -- KahaDB
</title>
</head>
<body>
<div class="white_box">
<div class="header">
<div class="header_l">
<div class="header_r">
</div>
</div>
</div>
<div class="content">
<div class="content_l">
<div class="content_r">
<div>
<!-- Banner -->
<div id="asf_logo">
<div id="activemq_logo">
<a shape="rect" style="float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;" href="http://activemq.apache.org" title="The most popular and powerful open source Message Broker">ActiveMQ</a>
<a shape="rect" style="float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;" href="http://www.apache.org" title="The Apache Software Foundation">ASF</a>
</div>
</div>
<div class="top_red_bar">
<div id="site-breadcrumbs">
<a href="features.html">Features</a>&nbsp;&gt;&nbsp;<a href="persistence.html">Persistence</a>&nbsp;&gt;&nbsp;<a href="kahadb.html">KahaDB</a>
</div>
<div id="site-quicklinks">
<p><a shape="rect" href="download.html">Download</a> | <a shape="rect" class="external-link" href="http://activemq.apache.org/maven/apidocs/index.html">JavaDocs</a> <a shape="rect" href="javadocs.html">More...</a> | <a shape="rect" href="source.html">Source</a> | <a shape="rect" href="discussion-forums.html">Forums</a> | <a shape="rect" href="support.html">Support</a></p>
</div>
</div>
<table border="0">
<tbody>
<tr>
<td valign="top" width="100%">
<div class="wiki-content maincontent"><p>KahaDB is a file based persistence database that is local to the message broker that is using it. It has been optimized for fast persistence. It is the the default storage mechanism since <strong>ActiveMQ 5.4</strong>. KahaDB uses less file descriptors and provides faster recovery than its predecessor, the <a shape="rect" href="amq-message-store.html">AMQ Message Store</a>.</p><h2 id="KahaDB-Configuration">Configuration</h2><p>To use KahaDB as the broker's persistence adapter configure ActiveMQ as follows (example):</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;"> &lt;broker brokerName="broker"&gt;
&lt;persistenceAdapter&gt;
&lt;kahaDB directory="activemq-data" journalMaxFileLength="32mb"/&gt;
&lt;/persistenceAdapter&gt;
&lt;/broker&gt;
</pre>
</div></div><h3 id="KahaDB-KahaDBProperties">KahaDB Properties</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Property</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Comments</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>archiveCorruptedIndex</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <strong><code>true</code></strong>, corrupted indexes found at startup will be archived (not deleted).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>archiveDataLogs</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <strong><code>true</code></strong>, will move a message data log to the archive directory instead of deleting it.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>checkForCorruptJournalFiles</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <strong><code>true</code></strong>, will check for corrupt journal files on startup and try and recover them.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>checkpointInterval</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>5000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Time (ms) before check-pointing the journal.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>checksumJournalFiles</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Create a checksum for a journal file. The presence of a checksum is required in order for the persistence adapter to be able to detect corrupt journal files.</p><p>Before <strong>ActiveMQ 5.9.0</strong>: the default is <strong><code>false</code></strong>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cleanupInterval</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>30000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The interval (in ms) between consecutive checks that determine which journal files, if any, are eligible for removal from the message store. An eligible journal file is one that has no outstanding references.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>compactAcksAfterNoGC</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>10</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>From <strong>ActiveMQ 5.14.0</strong>: when the acknowledgement compaction feature is enabled this value controls how many store GC cycles must be completed with no other files being cleaned up before the compaction logic is triggered to possibly compact older acknowledgements spread across journal files into a new log file.&#160; The lower the value set the faster the compaction may occur which can impact performance if it runs to often.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>compactAcksIgnoresStoreGrowth</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>From <strong>ActiveMQ 5.14.0</strong>:&#160;when the acknowledgement compaction feature is enabled this value controls whether compaction is run when the store is still growing or if it should only occur when the store has stopped growing (either due to idle or store limits reached).&#160; If enabled the compaction runs regardless of the store still having room or being active which can decrease overall performance but reclaim space faster.&#160;</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>concurrentStoreAndDispatchQueues</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Enable the dispatching of Queue messages to interested clients to happen concurrently with message storage.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>concurrentStoreAndDispatchTopics</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Enable the dispatching of Topic messages to interested clients to happen concurrently with message storage</p><div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Enabling this property is not recommended.</p></div></div></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>directory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>activemq-data</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The path to the directory to use to store the message store data and log files.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>directoryArchive</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Define the directory to move data logs to when they all the messages they contain have been consumed.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>enableAckCompaction</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>From <strong>ActiveMQ 5.14.0</strong>: this setting controls whether the store will perform periodic compaction of older journal log files that contain only Message acknowledgements. By compacting these older acknowledgements into new journal log files the older files can be removed freeing space and allowing the message store to continue to operate without hitting store size limits.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>enableIndexWriteAsync</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <strong><code>true</code></strong>, the index is updated asynchronously.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>enableJournalDiskSyncs</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span>Ensure every journal write is followed by a disk sync (JMS durability requirement).</span></p><div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This property is deprecated as of <strong>ActiveMQ</strong> <strong>5.14.0</strong>.</p><p>From <strong>ActiveMQ</strong> <strong>5.14.0</strong>: see <span style="color: rgb(34,34,34);"><strong><code>journalDiskSyncStrategy</code></strong>.</span></p></div></div></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>ignoreMissingJournalfiles</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If <strong><code>true</code></strong>, reports of missing journal files are ignored.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>indexCacheSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>10000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Number of index pages cached in memory.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>indexDirectory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p><span>From <strong>ActiveMQ 5.10.0</strong>: If set, configures where the KahaDB index files (<strong><code>db.data</code></strong> and&#160;<strong><code>db.redo</code></strong>) will be stored. If not set, the index files are stored in the directory specified by the&#160;<strong><code>directory</code></strong> attribute.</span></p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>indexWriteBatchSize</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Number of indexes written in a batch.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code><span>journalDiskSyncInterval</span></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Interval (ms) for when to perform a disk sync when&#160;<strong><code>journalDiskSyncStrategy=periodic</code></strong>. A sync will only be performed if a write has occurred to the journal since the last disk sync or when the journal rolls over to a new journal file.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code><span>journalDiskSyncStrategy</span></code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>always</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>From <strong>ActiveMQ 5.14.0</strong>: this setting configures the disk sync policy. The list of available sync strategies are (in order of decreasing safety, and increasing performance):</p><ul><li><p><strong><code>always</code></strong> <span>Ensure every journal write is followed by a disk sync (JMS durability requirement). This is the safest option but is also the slowest because it requires a sync after every message write. This is equivalent to the deprecated property&#160;<strong><code>enableJournalDiskSyncs=true</code></strong>.</span></p></li><li><p><strong><code>periodic</code></strong> <span style="color: rgb(34,34,34);">The disk will be synced at set intervals (if a write has occurred) instead of after every journal write which will reduce the load on the disk and should improve throughput</span>. The disk will also be synced when rolling over to a new journal file. The default interval is 1 second. The default interval offers very good performance, whilst being safer than&#160;<strong><code>never</code></strong> disk syncing, as data loss is limited to a maximum of 1 second's worth. See <strong><code>journalDiskSyncInterval</code></strong> to change the frequency of disk syncs.</p></li><li><p><strong><code>never</code></strong> A sync will never be explicitly called and it will be up to the operating system to flush to disk. This is equivalent to setting the deprecated property <strong><code>enableJournalDiskSyncs=false</code></strong>. This is the fastest option but is the least safe as there's no guarantee as to when data is flushed to disk. Consequently message loss <em>can</em> occur on broker failure.</p></li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>journalMaxFileLength</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>32mb</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>A hint to set the maximum size of the message data logs.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxAsyncJobs</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>10000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The maximum number of asynchronous messages that will be queued awaiting storage (should be the same as the number of concurrent MessageProducers).</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>preallocationScope</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>entire_journal</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>From <strong>ActiveMQ 5.14.0</strong>: this setting configures how journal data files are preallocated. The default strategy preallocates the journal file on first use using the appender thread.&#160;</p><ul><li><p><strong><code>entire_journal_async</code></strong> will use preallocate ahead of time in a separate thread.</p></li><li><p><strong><code>none</code></strong> disables preallocation.</p></li></ul><p>On SSD, using&#160;<strong><code>entire_journal_async</code></strong> avoids delaying writes pending preallocation on first use.</p><p><strong>Note</strong>: on HDD the additional thread contention for disk has a negative impact. Therefore use the default.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>preallocationStrategy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>sparse_file</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>From <strong>ActiveMQ 5.12.0</strong>:&#160;This setting configures how the broker will try to preallocate the journal files when a new journal file is needed.</p><ul><li><p><strong><code>sparse_file</code></strong> - sets the file length, but does not populate it with any data.</p></li><li><p><strong><code>os_kernel_copy</code></strong> - delegates the preallocation to the Operating System.</p></li><li><p><strong><code>zeros</code></strong>&#160; - each preallocated journal file contains nothing but <strong><code>0x00</code></strong> throughout.</p></li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>storeOpenWireVersion</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>11</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Determines the version of OpenWire commands that are marshaled to the KahaDB journal.&#160;</p><p>Before <strong>ActiveMQ 5.12.0</strong>: the default value is <strong><code>6</code></strong>.</p><p>Some features of the broker depend on information stored in the OpenWire commands from newer protocol revisions and these may not work correctly if the store version is set to a lower value.&#160; KahaDB stores from broker versions greater than 5.9.0 will in many cases still be readable by the broker but will cause the broker to continue using the older store version meaning newer features may not work as intended.&#160;</p><p>For KahaDB stores that were created in versions prior to <strong>ActiveMQ 5.9.0</strong> it will be necessary to manually set <strong><code>storeOpenWireVersion="6"</code></strong> in order to start a broker without error.</p></td></tr></tbody></table></div><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>For tuning locking properties see the options listed at <a shape="rect" href="pluggable-storage-lockers.html">Pluggable storage lockers.</a></p></div></div><p>&#160;</p><h3 id="KahaDB-SlowFileSystemAccessDiagnosticLogging">Slow File System Access Diagnostic Logging</h3><p>You can configure a non zero threshold in milliseconds for database updates. If database operation is slower than that threshold (for example if you set it to <strong><code>500</code></strong>), you may see messages like:</p><div class="panel" style="border-width: 1px;"><div class="panelContent">
<p><code>Slow KahaDB access: cleanup took 1277 | org.apache.activemq.store.kahadb.MessageDatabase | ActiveMQ Journal Checkpoint Worker</code></p>
</div></div><p>You can configure a threshold used to log these messages by using a system property and adjust it to your disk speed so that you can easily pick up runtime anomalies.</p><div class="panel" style="border-width: 1px;"><div class="panelContent">
<p><code>-Dorg.apache.activemq.store.kahadb.LOG_SLOW_ACCESS_TIME=1500</code></p>
</div></div><h1 id="KahaDB-Multi(m)kahaDBPersistenceAdapter">Multi(m) kahaDB Persistence Adapter</h1><p>From <strong>ActiveMQ 5.6</strong>: it's possible to distribute destinations stores across multiple kahdb persistence adapters. When would you do this? If you have one fast producer/consumer destination and another periodic producer destination that has irregular batch consumption then disk usage can grow out of hand as unconsumed messages become distributed across multiple journal files. Having a separate journal for each ensures minimal journal usage. Also, some destination may be critical and require disk synchronization while others may not. In these cases you can use the&#160;<strong><code>mKahaDB</code></strong> persistence adapter and filter destinations using wildcards, just like with destination policy entries.</p><h3 id="KahaDB-Transactions">Transactions</h3><p>Transactions can span multiple journals if the destinations are distributed. This means that two phase completion is necessary, which does impose a performance (additional disk sync) penalty to record the commit outcome. This penalty is only imposed if more than one journal is involved in a transaction.</p><h3 id="KahaDB-Configuration.1">Configuration</h3><p>Each instance of&#160;<strong><code>kahaDB</code></strong> can be configured independently. If no destination is supplied to a <strong><code>filteredKahaDB</code></strong>, the implicit default value will match any destination, queue or topic. This is a handy catch all. If no matching persistence adapter can be found, destination creation will fail with an exception. The <strong><code>filteredKahaDB</code></strong> shares its wildcard matching rules with <a shape="rect" href="per-destination-policies.html">Per Destination Policies</a>.</p><p>From ActiveMQ 5.15, <strong><code>filteredKahaDB</code></strong>&#160;support a StoreUsage&#160;attribute named <strong><code>usage</code></strong>. This allows individual disk limits to be imposed on matching queues.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;broker brokerName="broker"&gt;
&#160;&lt;persistenceAdapter&gt;
&lt;mKahaDB directory="${activemq.base}/data/kahadb"&gt;
&lt;filteredPersistenceAdapters&gt;
&lt;!-- match all queues --&gt;
&lt;filteredKahaDB queue="&gt;"&gt;
&lt;usage&gt;
&lt;storeUsage limit="1g" /&gt;
&lt;/usage&gt;
&lt;persistenceAdapter&gt;
&lt;kahaDB journalMaxFileLength="32mb"/&gt;
&lt;/persistenceAdapter&gt;
&lt;/filteredKahaDB&gt;
&lt;!-- match all destinations --&gt;
&lt;filteredKahaDB&gt;
&lt;persistenceAdapter&gt;
&lt;kahaDB enableJournalDiskSyncs="false"/&gt;
&lt;/persistenceAdapter&gt;
&lt;/filteredKahaDB&gt;
&lt;/filteredPersistenceAdapters&gt;
&lt;/mKahaDB&gt;
&lt;/persistenceAdapter&gt;
&lt;/broker&gt;
</pre>
</div></div><h3 id="KahaDB-AutomaticPerDestinationPersistenceAdapter">Automatic Per Destination Persistence Adapter</h3><p>Set <strong><code>perDestination="true"</code></strong> on the catch all, i.e., when no explicit destination is set, <strong><code>filteredKahaDB</code></strong> entry. Each matching destination will be assigned its own <strong><code>kahaDB</code></strong> instance.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;broker brokerName="broker"&gt;
&#160;&lt;persistenceAdapter&gt;
&lt;mKahaDB directory="${activemq.base}/data/kahadb"&gt;
&lt;filteredPersistenceAdapters&gt;
&lt;!-- kahaDB per destinations --&gt;
&lt;filteredKahaDB perDestination="true"&gt;
&lt;persistenceAdapter&gt;
&lt;kahaDB journalMaxFileLength="32mb"/&gt;
&lt;/persistenceAdapter&gt;
&lt;/filteredKahaDB&gt;
&lt;/filteredPersistenceAdapters&gt;
&lt;/mKahaDB&gt;
&lt;/persistenceAdapter&gt;
&lt;/broker&gt;
</pre>
</div></div><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>Specifying both <strong><code>perDestination="true"</code></strong> <em>and</em>&#160;<strong><code>queue="&gt;"</code></strong> on the same&#160;<strong><code>filteredKahaDB</code></strong> entry has not been tested. It <em> may</em> result in the following exception being raised:</p><p><code>Reason: java.io.IOException: File '/opt/java/apache-activemq-5.9.0/data/mKahaDB/lock' could not be locked as lock is already held for this jvm</code></p></div></div></div>
</td>
<td valign="top">
<div class="navigation">
<div class="navigation_top">
<div class="navigation_bottom">
<h3 id="Navigation-Overviewhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=35985"><a shape="rect" href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect" href="index.html">Index</a></li><li><a shape="rect" href="news.html">News</a></li><li><a shape="rect" href="new-features.html">New Features</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li><li><a shape="rect" href="faq.html">FAQ</a></li><li><a shape="rect" href="articles.html">Articles</a></li><li><a shape="rect" href="books.html">Books</a></li><li><a shape="rect" href="download.html">Download</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/licenses/">License</a></li></ul><h3 id="Navigation-Search">Search</h3><div>
<form enctype="application/x-www-form-urlencoded" method="get" action="http://www.google.com/search" style="font-size: 10px;">
<input type="hidden" name="ie" value="UTF-8">
<input type="hidden" name="oe" value="UTF-8">
<input maxlength="255" type="text" name="q" size="15" value="value"><br clear="none">
<input type="submit" name="btnG" value="Search">
<input type="hidden" name="domains" value="activemq.apache.org">
<input type="hidden" name="sitesearch" value="activemq.apache.org">
</form>
</div>
<h3 id="Navigation-SubProjects">Sub Projects</h3><ul class="alternate"><li><a shape="rect" class="external-link" href="http://activemq.apache.org/artemis/">Artemis</a></li><li><a shape="rect" class="external-link" href="http://activemq.apache.org/apollo" title="ActiveMQ Apollo">Apollo</a></li><li><a shape="rect" class="external-link" href="http://activemq.apache.org/cms/">CMS</a></li><li><a shape="rect" class="external-link" href="http://activemq.apache.org/nms/" title="NMS is the .Net Messaging API">NMS</a></li></ul><h3 id="Navigation-Communityhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=36130"><a shape="rect" href="community.html">Community</a></h3><ul class="alternate"><li><a shape="rect" href="support.html">Support</a></li><li><a shape="rect" href="contributing.html">Contributing</a></li><li><a shape="rect" href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect" href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect" href="irc.html">IRC</a></li><li><a shape="rect" class="external-link" href="http://javabot.evanchooly.com/logs/%23apache-activemq/today" rel="nofollow">IRC Log</a></li><li><a shape="rect" href="security-advisories.html">Security Advisories</a></li><li><a shape="rect" href="site.html">Site</a></li><li><a shape="rect" class="external-link" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a shape="rect" href="projects-using-activemq.html">Projects Using ActiveMQ</a></li><li><a shape="rect" href="users.html">Users</a></li><li><a shape="rect" href="team.html">Team</a></li><li><a shape="rect" href="thanks.html">Thanks</a></li></ul><h3 id="Navigation-Featureshttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=35883"><a shape="rect" href="features.html">Features</a></h3><ul class="alternate"><li><a shape="rect" href="advisory-message.html">Advisory Message</a></li><li><a shape="rect" href="clustering.html">Clustering</a></li><li><a shape="rect" href="cross-language-clients.html">Cross Language Clients</a></li><li><a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></li><li><a shape="rect" href="jmx.html">JMX</a></li><li><a shape="rect" href="jms-to-jms-bridge.html">JMS to JMS Bridge</a></li><li><a shape="rect" href="masterslave.html">MasterSlave</a></li><li><a shape="rect" href="message-groups.html">Message Groups</a></li><li><a shape="rect" href="networks-of-brokers.html">Networks of Brokers</a></li><li><a shape="rect" href="performance.html">Performance</a></li><li><a shape="rect" href="persistence.html">Persistence</a></li><li><a shape="rect" href="security.html">Security</a></li><li><a shape="rect" href="virtual-destinations.html">Virtual Destinations</a></li><li><a shape="rect" href="visualisation.html">Visualisation</a></li><li><a shape="rect" href="features.html">More ...</a></li></ul><h3 id="Navigation-Connectivityhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=36167"><a shape="rect" href="connectivity.html">Connectivity</a></h3><ul class="alternate"><li><a shape="rect" href="ajax.html">Ajax</a></li><li><a shape="rect" href="amqp.html">AMQP</a></li><li><a shape="rect" href="axis-and-cxf-support.html">Axis and CXF Support</a></li><li><a shape="rect" href="c-integration.html">C Integration</a></li><li><a shape="rect" href="activemq-c-clients.html">C++</a></li><li><a shape="rect" class="external-link" href="http://activemq.apache.org/nms/">C# and .Net Integration</a></li><li><a shape="rect" class="external-link" href="http://activemq.apache.org/cms/">CMS</a></li><li><a shape="rect" href="j2ee.html">J2EE</a></li><li><a shape="rect" href="jboss-integration.html">JBoss Integration</a></li><li><a shape="rect" class="external-link" href="http://docs.codehaus.org/display/JETTY/Integrating+with+ActiveMQ" rel="nofollow">Jetty</a></li><li><a shape="rect" href="jndi-support.html">JNDI Support</a></li><li><a shape="rect" class="external-link" href="http://activemq.apache.org/nms/" title="NMS is the .Net Messaging API">NMS</a></li><li><a shape="rect" href="rest.html">REST</a></li><li><a shape="rect" href="rss-and-atom.html">RSS and Atom</a></li><li><a shape="rect" href="spring-support.html">Spring Support</a></li><li><a shape="rect" href="stomp.html">Stomp</a></li><li><a shape="rect" href="tomcat.html">Tomcat</a></li><li><a shape="rect" href="unix-service.html">Unix Service</a></li><li><a shape="rect" href="weblogic-integration.html">WebLogic Integration</a></li><li><a shape="rect" href="xmpp.html">XMPP</a></li><li><a shape="rect" href="connectivity.html">More ...</a></li></ul><h3 id="Navigation-UsingActiveMQ5https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=71176"><a shape="rect" href="using-activemq-5.html">Using ActiveMQ 5</a></h3><ul class="alternate"><li><a shape="rect" href="version-5-getting-started.html">Getting Started</a></li><li><a shape="rect" href="version-5-initial-configuration.html">Initial Configuration</a></li><li><a shape="rect" href="version-5-run-broker.html">Running a Broker</a></li><li><a shape="rect" href="how-do-i-embed-a-broker-inside-a-connection.html">Embedded Brokers</a></li><li><a shape="rect" href="activemq-command-line-tools-reference.html">Command Line Tools</a></li><li><a shape="rect" href="configuring-version-5-transports.html">Configuring Transports</a></li><li><a shape="rect" href="version-5-examples.html">Examples</a></li><li><a shape="rect" href="version-5-web-samples.html">Web Samples</a></li><li><a shape="rect" href="how-can-i-monitor-activemq.html">Monitoring the Broker</a></li><li><a shape="rect" href="version-5-xml-configuration.html">Xml Configuration</a></li><li><a shape="rect" href="xml-reference.html">Xml Reference</a></li><li><a shape="rect" href="using-activemq-5.html">More ...</a></li></ul><h3 id="Navigation-Toolshttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=35912"><a shape="rect" href="tools.html">Tools</a></h3><ul class="alternate"><li><a shape="rect" href="web-console.html">Web Console</a></li><li><a shape="rect" href="activemq-performance-module-users-manual.html">Maven2 Performance Plugin</a></li></ul><h3 id="Navigation-Supporthttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=35919"><a shape="rect" href="support.html">Support</a></h3><ul class="alternate"><li><a shape="rect" class="external-link" href="http://issues.apache.org/jira/browse/AMQ">Issues</a></li><li><a shape="rect" class="external-link" href="http://issues.apache.org/activemq/browse/AMQ?report=com.atlassian.jira.plugin.system.project:roadmap-panel">Roadmap</a></li><li><a shape="rect" class="external-link" href="http://issues.apache.org/activemq/browse/AMQ?report=com.atlassian.jira.plugin.system.project:changelog-panel">Change log</a></li></ul><h3 id="Navigation-Developershttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=35903"><a shape="rect" href="developers.html">Developers</a></h3><ul class="alternate"><li><a shape="rect" href="source.html">Source</a></li><li><a shape="rect" href="building.html">Building</a></li><li><a shape="rect" href="developer-guide.html">Developer Guide</a></li><li><a shape="rect" href="becoming-a-committer.html">Becoming a committer</a></li><li><a shape="rect" href="code-overview.html">Code Overview</a></li><li><a shape="rect" href="wire-protocol.html">Wire Protocol</a></li><li><a shape="rect" href="release-guide.html">Release Guide</a></li></ul><h3 id="Navigation-Tests">Tests</h3><ul class="alternate"><li><a shape="rect" href="activemq-performance-module-users-manual.html">Maven2 Performance Plugin</a></li><li><a shape="rect" href="benchmark-tests.html">Benchmark Tests</a></li><li><a shape="rect" href="jmeter-system-tests.html">JMeter System Tests</a></li><li><a shape="rect" href="jmeter-performance-tests.html">JMeter Performance Tests</a></li><li><a shape="rect" href="integration-tests.html">Integration Tests</a></li></ul><h3 id="Navigation-ProjectReports">Project Reports</h3><ul class="alternate"><li><a shape="rect" href="junit-reports.html">JUnit Reports</a></li><li><a shape="rect" href="source-xref.html">Source XRef</a></li><li><a shape="rect" href="test-source-xref.html">Test Source XRef</a></li><li><a shape="rect" href="xml-reference.html">Xml Reference</a></li></ul>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="bottom_red_bar"></div>
</div>
</div>
</div>
</div>
<div class="black_box">
<div class="footer">
<div class="footer_l">
<div class="footer_r">
<div>
<a href="http://activemq.apache.org/privacy-policy.html">Privacy Policy</a> -
(<a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=120465">edit this page</a>)
</div>
</div>
</div>
</div>
</div>
</div>
<div class="design_attribution">
&copy; 2004-2011 The Apache Software Foundation.
<br/>
Apache ActiveMQ, ActiveMQ, Apache, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
<br/>
<a href="http://hiramchirino.com">Graphic Design By Hiram</a>
</div>
<!-- delay the loading of large javascript files to the end so that they don't interfere with the loading of page content -->
<span style="display: none">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1347593-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</span>
</body>
</html>