Author: buildbot
Date: Fri Jul 27 13:24:29 2018
New Revision: 1033143
Log:
Production update by buildbot for activemq
Modified:
websites/production/activemq/content/cache/main.pageCache
websites/production/activemq/content/configurable-ioexception-handling.html
Modified: websites/production/activemq/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified:
websites/production/activemq/content/configurable-ioexception-handling.html
==============================================================================
--- websites/production/activemq/content/configurable-ioexception-handling.html
(original)
+++ websites/production/activemq/content/configurable-ioexception-handling.html
Fri Jul 27 13:24:29 2018
@@ -81,7 +81,7 @@
<tr>
<td valign="top" width="100%">
<div class="wiki-content maincontent"><p>Starting with 5.3.1, ActiveMQ
provides configurable IOException handling for its file-based message stores.
From version 5.5 the handler is also invoked when the JDBC persistence adapter
gets a failure on <code>getConnection()</code>.</p><h2
id="ConfigurableIOExceptionHandling-DefaultIOExceptionhandler">Default
IOException handler</h2><p>ActiveMQ comes with a default IOException handler,
which does the following. When some of the file-based message stores encounter
IOException it can be one of the two things: either the disk is unavailable of
there's no more space on the disk.</p><p>The first case is usually encountered
when disk fails or network disk is disconnected. These errors are not
"recoverable" and we usually want to shutdown the broker until problems with
the disk are solved.</p><p>When there's no more space on the disk, we usually
want to wait that some space is reclaimed and continue what we have been doing
before (exchanging messa
ges). All file-based persistent stores are capable of surviving these kind of
errors.</p><h3
id="ConfigurableIOExceptionHandling-ConfiguringDefaultIOExceptionhandler">Configuring
Default IOException handler</h3><p>There are a couple of properties you can
use to tune the behavior of the <code>DefaultIOExceptionHandler</code>. First,
instantiate the exception handler as a bean. Then configure the broker to use
the exception handler by setting the broker's <code>ioExceptionHandler</code>
property.</p><p>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;"> <bean id="ioExceptionHandler"
class="org.apache.activemq.util.DefaultIOExceptionHandler">
+<pre class="brush: xml; gutter: false; theme: Default"> <bean
id="ioExceptionHandler"
class="org.apache.activemq.util.DefaultIOExceptionHandler">
<property
name="ignoreAllErrors"><value>true</value></property>
</bean>
@@ -89,8 +89,8 @@
...
</broker>
</pre>
-</div></div><p>Handler configuration properties:</p><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">Since</th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>ignoreAllErrors</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd">5.4</td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>When <code>true</code> all errors are
ignored and the broker remains running.</p></td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><p><code>ignoreNoSpaceErrors</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd">5.4</td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>true</code></p><
/td><td colspan="1" rowspan="1" class="confluenceTd"><p>When
<code>false</code> 'no disk space' errors are treated the same as other errors
causing the broker to be stopped.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>noSpaceMessage</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd">5.4</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>space</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The string used to match against the exception's
message. When matched a 'no disk space' error results.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><span style="color:
rgb(0,0,0);"><code>ignoreSQLExceptions</code></span></p></td><td colspan="1"
rowspan="1" class="confluenceTd">5.5</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>If <code>true</code> all SQLExceptions are ignored by
the handler allowing them to be han
dled by the persistence adapter's locker. When <code>false</code> the
exception handler processes the exception.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p><span style="color:
rgb(0,0,0);"><code>sqlExceptionMessage</code></span></p></td><td colspan="1"
rowspan="1" class="confluenceTd">5.5</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>""</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The SQLException phrase to match when ignoring
SQLExceptions. Only matched exceptions are ignored. All SQLExceptions match the
default empty string.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color:
rgb(0,0,0);"><code>stopStartConnectors</code></span></p></td><td colspan="1"
rowspan="1" class="confluenceTd">5.5</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>When <code>true</code> transport connectors are stopped
(clien
t connections are refused), however, the broker will remain running. The
transport connectors will be restarted following a successful persistence
adapter checkpoint. All exceptions are ignored whilst the transport connectors
are stopped. This option ensures that the broker does not need to be manually
restarted in the event of a DB restart, for example.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><span style="color:
rgb(0,0,0);"><code>resumeCheckSleepPeriod</code></span></p></td><td colspan="1"
rowspan="1" class="confluenceTd">5.5</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>5sec</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The interval between persistence adapter checkpoints.
Typically used in conjunction with
<code>stopStartConnectors</code>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color:
rgb(0,0,0);">systemExitOnShutdown</span></p></td><td colspan="1" rowspan="1"
class="conf
luenceTd">5.13</td><td colspan="1" rowspan="1"
class="confluenceTd">false</td><td colspan="1" rowspan="1"
class="confluenceTd"><span style="color: rgb(0,0,0);">before stopping the
broker, set the broker attribute <span style="line-height:
1.42857;">systemExitOnShutdown to this value to potentially force a jvm exit.
</span></span></td></tr></tbody></table></div><p><span style="color:
rgb(0,0,0);">The default configuration will try to find a specified string in
the exception message to determine whether it is a 'no disk space' error. On
most platforms (at least those we have tested), you'll find the word 'space' in
it. Of course, you can customize this to your platform by using <code
style="line-height: 1.42857;">noSpaceMessage</code>
property.</span></p><p>Note: as of ActiveMQ 5.11 the
<code>JDBCIOExceptionHandler</code> has been deprecated. It has been replaced
by the <code>org.apache.activemq.util.LeaseLockerIOExceptionHandler</code> that
will work with any persistence adapter that
supports pluggable storage lockers whether or not a locker is in
use.</p><p><span style="color: rgb(102,0,51);">Writing your own
handler</span></p><p>In case this handler doesn't work for you, you can write
your own. For example you might want to change the way how you detect full disk
and execute some external command, like <code>df</code> on Linux to be
sure.</p><p>All you have to do is implement the
<code>org.apache.activemq.util.IOExceptionHandler</code> interface then
configure the broker to use it:</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;"> <bean id="ioExceptionHandler"
class="com.mycompany.MyIOExceptionHandler">
+</div></div><p>Handler configuration properties:</p><div
class="table-wrap"><table class="confluenceTable"><colgroup span="1"><col
span="1"><col span="1"><col span="1"><col span="1"></colgroup><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p>Property</p></th><th
colspan="1" rowspan="1" class="confluenceTh">Since</th><th colspan="1"
rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1"
class="confluenceTd"><p><code>ignoreAllErrors</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd">5.4</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>When <code>true</code> all errors are ignored and the
broker remains running.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>ignoreNoSpaceErrors</code></p></td><td
colspan="1" rowspan="1" class="confluence
Td">5.4</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>When <code>false</code> 'no disk space' errors are
treated the same as other errors causing the broker to be stopped. From 5.15.0
<span>ignoreAllErrors needs to be used because the appender stops on the first
error leading to secondary exceptions from concurrent
operations.</span></p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>noSpaceMessage</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd">5.4</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>space</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The string used to match against the exception's
message. When matched a 'no disk space' error results.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><span style="color:
rgb(0,0,0);"><code>ignoreSQLExceptions</code></span></p></td><td colspan="1"
rowspan="1
" class="confluenceTd">5.5</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>If <code>true</code> all SQLExceptions are ignored by
the handler allowing them to be handled by the persistence adapter's locker.
When <code>false</code> the exception handler processes the
exception.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color:
rgb(0,0,0);"><code>sqlExceptionMessage</code></span></p></td><td colspan="1"
rowspan="1" class="confluenceTd">5.5</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>""</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The SQLException phrase to match when ignoring
SQLExceptions. Only matched exceptions are ignored. All SQLExceptions match the
default empty string.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color:
rgb(0,0,0);"><code>stopStartConnectors</code></span></p></td>
<td colspan="1" rowspan="1" class="confluenceTd">5.5</td><td colspan="1"
rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>When <code>true</code> transport connectors
are stopped (client connections are refused), however, the broker will remain
running. The transport connectors will be restarted following a successful
persistence adapter checkpoint. All exceptions are ignored whilst the transport
connectors are stopped. This option ensures that the broker does not need to be
manually restarted in the event of a DB restart, for
example.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color:
rgb(0,0,0);"><code>resumeCheckSleepPeriod</code></span></p></td><td colspan="1"
rowspan="1" class="confluenceTd">5.5</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><code>5sec</code></p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The interval between persistence adapter checkpoin
ts. Typically used in conjunction with
<code>stopStartConnectors</code>.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p><span style="color:
rgb(0,0,0);">systemExitOnShutdown</span></p></td><td colspan="1" rowspan="1"
class="confluenceTd">5.13</td><td colspan="1" rowspan="1"
class="confluenceTd">false</td><td colspan="1" rowspan="1"
class="confluenceTd"><span style="color: rgb(0,0,0);">before stopping the
broker, set the broker attribute <span style="line-height:
1.42857;">systemExitOnShutdown to this value to potentially force a jvm exit.
</span></span></td></tr></tbody></table></div><p><span style="color:
rgb(0,0,0);">The default configuration will try to find a specified string in
the exception message to determine whether it is a 'no disk space' error. On
most platforms (at least those we have tested), you'll find the word 'space' in
it. Of course, you can customize this to your platform by using <code
style="line-height: 1.42857;">noSpaceMessage</code> prop
erty.</span></p><p>Note: as of ActiveMQ 5.11 the
<code>JDBCIOExceptionHandler</code> has been deprecated. It has been replaced
by the <code>org.apache.activemq.util.LeaseLockerIOExceptionHandler</code> that
will work with any persistence adapter that supports pluggable storage lockers
whether or not a locker is in use.</p><p><span style="color:
rgb(102,0,51);">Writing your own handler</span></p><p>In case this handler
doesn't work for you, you can write your own. For example you might want to
change the way how you detect full disk and execute some external command, like
<code>df</code> on Linux to be sure.</p><p>All you have to do is implement the
<code>org.apache.activemq.util.IOExceptionHandler</code> interface then
configure the broker to use it:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default"> <bean
id="ioExceptionHandler" class="com.mycompany.MyIOExceptionHandler">
<property
name="ignoreAllErrors"><value>true</value></property>
</bean>