activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject svn commit: r1018163 [31/45] - in /websites/production/activemq/content/artemis/docs: 2.2.0/ latest/ latest/diagrams/ latest/gitbook/ latest/gitbook/fonts/ latest/gitbook/fonts/fontawesome/ latest/gitbook/gitbook-plugin-fontsettings/ latest/gitbook/git...
Date Thu, 14 Sep 2017 19:48:13 GMT
Added: websites/production/activemq/content/artemis/docs/latest/persistence.html
==============================================================================
--- websites/production/activemq/content/artemis/docs/latest/persistence.html (added)
+++ websites/production/activemq/content/artemis/docs/latest/persistence.html Thu Sep 14 19:48:11 2017
@@ -0,0 +1,1436 @@
+
+<!DOCTYPE HTML>
+<html lang="" >
+    <head>
+        <title>Persistence · ActiveMQ Artemis Documentation</title>
+        <meta charset="UTF-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
+        <meta name="description" content="">
+        <meta name="generator" content="GitBook 3.1.1">
+        
+        
+        
+    
+    <link rel="stylesheet" href="gitbook/style.css">
+
+    
+            
+                
+                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
+                
+            
+                
+                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
+                
+            
+                
+                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
+                
+            
+        
+
+    
+
+    
+        
+    
+        
+    
+        
+    
+        
+    
+        
+    
+        
+    
+
+        
+    
+    
+    <meta name="HandheldFriendly" content="true"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
+    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
+
+    
+    <link rel="next" href="configuring-transports.html" />
+    
+    
+    <link rel="prev" href="filter-expressions.html" />
+    
+
+    </head>
+    <body>
+        
+<div class="book">
+    <div class="book-summary">
+        
+            
+<div id="book-search-input" role="search">
+    <input type="text" placeholder="Type to search" />
+</div>
+
+            
+                <nav role="navigation">
+                
+
+
+<ul class="summary">
+    
+    
+
+    
+
+    
+        
+        
+    
+        <li class="chapter " data-level="1.1" data-path="./">
+            
+                <a href="./">
+            
+                    
+                    Introduction
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.2" data-path="notice.html">
+            
+                <a href="notice.html">
+            
+                    
+                    Legal Notice
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.3" data-path="preface.html">
+            
+                <a href="preface.html">
+            
+                    
+                    Preface
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.4" data-path="project-info.html">
+            
+                <a href="project-info.html">
+            
+                    
+                    Project Info
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.5" data-path="messaging-concepts.html">
+            
+                <a href="messaging-concepts.html">
+            
+                    
+                    Messaging Concepts
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.6" data-path="architecture.html">
+            
+                <a href="architecture.html">
+            
+                    
+                    Architecture
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.7" data-path="using-server.html">
+            
+                <a href="using-server.html">
+            
+                    
+                    Using the Server
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.8" data-path="address-model.html">
+            
+                <a href="address-model.html">
+            
+                    
+                    Address Model
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.9" data-path="using-jms.html">
+            
+                <a href="using-jms.html">
+            
+                    
+                    Using JMS
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.10" data-path="using-core.html">
+            
+                <a href="using-core.html">
+            
+                    
+                    Using Core
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.11" data-path="using-AMQP.html">
+            
+                <a href="using-AMQP.html">
+            
+                    
+                    Using AMQP
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.12" data-path="jms-core-mapping.html">
+            
+                <a href="jms-core-mapping.html">
+            
+                    
+                    Mapping JMS Concepts to the Core API
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.13" data-path="client-classpath.html">
+            
+                <a href="client-classpath.html">
+            
+                    
+                    The Client Classpath
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.14" data-path="examples.html">
+            
+                <a href="examples.html">
+            
+                    
+                    Examples
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.15" data-path="wildcard-routing.html">
+            
+                <a href="wildcard-routing.html">
+            
+                    
+                    Routing Messages With Wild Cards
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.16" data-path="wildcard-syntax.html">
+            
+                <a href="wildcard-syntax.html">
+            
+                    
+                    Understanding the Apache ActiveMQ Artemis Wildcard Syntax
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.17" data-path="filter-expressions.html">
+            
+                <a href="filter-expressions.html">
+            
+                    
+                    Filter Expressions
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter active" data-level="1.18" data-path="persistence.html">
+            
+                <a href="persistence.html">
+            
+                    
+                    Persistence
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.19" data-path="configuring-transports.html">
+            
+                <a href="configuring-transports.html">
+            
+                    
+                    Configuring Transports
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.20" data-path="config-reload.html">
+            
+                <a href="config-reload.html">
+            
+                    
+                    Configuration Reload
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.21" data-path="connection-ttl.html">
+            
+                <a href="connection-ttl.html">
+            
+                    
+                    Detecting Dead Connections
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.22" data-path="slow-consumers.html">
+            
+                <a href="slow-consumers.html">
+            
+                    
+                    Detecting Slow Consumers
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.23" data-path="network-isolation.html">
+            
+                <a href="network-isolation.html">
+            
+                    
+                    Avoiding Network Isolation
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.24" data-path="critical-analysis.html">
+            
+                <a href="critical-analysis.html">
+            
+                    
+                    Detecting Broker Issues (Critical Analysis)
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.25" data-path="transaction-config.html">
+            
+                <a href="transaction-config.html">
+            
+                    
+                    Resource Manager Configuration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.26" data-path="flow-control.html">
+            
+                <a href="flow-control.html">
+            
+                    
+                    Flow Control
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.27" data-path="send-guarantees.html">
+            
+                <a href="send-guarantees.html">
+            
+                    
+                    Guarantees of sends and commits
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.28" data-path="undelivered-messages.html">
+            
+                <a href="undelivered-messages.html">
+            
+                    
+                    Message Redelivery and Undelivered Messages
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.29" data-path="message-expiry.html">
+            
+                <a href="message-expiry.html">
+            
+                    
+                    Message Expiry
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.30" data-path="large-messages.html">
+            
+                <a href="large-messages.html">
+            
+                    
+                    Large Messages
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.31" data-path="paging.html">
+            
+                <a href="paging.html">
+            
+                    
+                    Paging
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.32" data-path="queue-attributes.html">
+            
+                <a href="queue-attributes.html">
+            
+                    
+                    Queue Attributes
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.33" data-path="scheduled-messages.html">
+            
+                <a href="scheduled-messages.html">
+            
+                    
+                    Scheduled Messages
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.34" data-path="last-value-queues.html">
+            
+                <a href="last-value-queues.html">
+            
+                    
+                    Last-Value Queues
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.35" data-path="message-grouping.html">
+            
+                <a href="message-grouping.html">
+            
+                    
+                    Message Grouping
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.36" data-path="pre-acknowledge.html">
+            
+                <a href="pre-acknowledge.html">
+            
+                    
+                    Extra Acknowledge Modes
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.37" data-path="management.html">
+            
+                <a href="management.html">
+            
+                    
+                    Management
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.38" data-path="management-console.html">
+            
+                <a href="management-console.html">
+            
+                    
+                    Management Console
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.39" data-path="security.html">
+            
+                <a href="security.html">
+            
+                    
+                    Security
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.40" data-path="broker-plugins.html">
+            
+                <a href="broker-plugins.html">
+            
+                    
+                    Broker Plugins
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.41" data-path="resource-limits.html">
+            
+                <a href="resource-limits.html">
+            
+                    
+                    Resource Limits
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.42" data-path="jms-bridge.html">
+            
+                <a href="jms-bridge.html">
+            
+                    
+                    The JMS Bridge
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.43" data-path="client-reconnection.html">
+            
+                <a href="client-reconnection.html">
+            
+                    
+                    Client Reconnection and Session Reattachment
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.44" data-path="diverts.html">
+            
+                <a href="diverts.html">
+            
+                    
+                    Diverting and Splitting Message Flows
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.45" data-path="core-bridges.html">
+            
+                <a href="core-bridges.html">
+            
+                    
+                    Core Bridges
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.46" data-path="duplicate-detection.html">
+            
+                <a href="duplicate-detection.html">
+            
+                    
+                    Duplicate Message Detection
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.47" data-path="clusters.html">
+            
+                <a href="clusters.html">
+            
+                    
+                    Clusters
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.48" data-path="ha.html">
+            
+                <a href="ha.html">
+            
+                    
+                    High Availability and Failover
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.49" data-path="graceful-shutdown.html">
+            
+                <a href="graceful-shutdown.html">
+            
+                    
+                    Graceful Server Shutdown
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.50" data-path="libaio.html">
+            
+                <a href="libaio.html">
+            
+                    
+                    Libaio Native Libraries
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.51" data-path="thread-pooling.html">
+            
+                <a href="thread-pooling.html">
+            
+                    
+                    Thread management
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.52" data-path="logging.html">
+            
+                <a href="logging.html">
+            
+                    
+                    Logging
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.53" data-path="rest.html">
+            
+                <a href="rest.html">
+            
+                    
+                    REST Interface
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.54" data-path="embedding-activemq.html">
+            
+                <a href="embedding-activemq.html">
+            
+                    
+                    Embedding Apache ActiveMQ Artemis
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.55" data-path="karaf.html">
+            
+                <a href="karaf.html">
+            
+                    
+                    Apache Karaf
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.56" data-path="spring-integration.html">
+            
+                <a href="spring-integration.html">
+            
+                    
+                    Spring Integration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.57" data-path="cdi-integration.html">
+            
+                <a href="cdi-integration.html">
+            
+                    
+                    CDI Integration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.58" data-path="intercepting-operations.html">
+            
+                <a href="intercepting-operations.html">
+            
+                    
+                    Intercepting Operations
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.59" data-path="protocols-interoperability.html">
+            
+                <a href="protocols-interoperability.html">
+            
+                    
+                    Protocols and Interoperability
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.60" data-path="tools.html">
+            
+                <a href="tools.html">
+            
+                    
+                    Tools
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.61" data-path="maven-plugin.html">
+            
+                <a href="maven-plugin.html">
+            
+                    
+                    Maven Plugin
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.62" data-path="unit-testing.html">
+            
+                <a href="unit-testing.html">
+            
+                    
+                    Unit Testing
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.63" data-path="perf-tuning.html">
+            
+                <a href="perf-tuning.html">
+            
+                    
+                    Troubleshooting and Performance Tuning
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.64" data-path="configuration-index.html">
+            
+                <a href="configuration-index.html">
+            
+                    
+                    Configuration Reference
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.65" data-path="updating-artemis.html">
+            
+                <a href="updating-artemis.html">
+            
+                    
+                    Updating Artemis
+            
+                </a>
+            
+
+            
+        </li>
+    
+
+    
+
+    <li class="divider"></li>
+
+    <li>
+        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
+            Published with GitBook
+        </a>
+    </li>
+</ul>
+
+
+                </nav>
+            
+        
+    </div>
+
+    <div class="book-body">
+        
+            <div class="body-inner">
+                
+                    
+
+<div class="book-header" role="navigation">
+    
+
+    <!-- Title -->
+    <h1>
+        <i class="fa fa-circle-o-notch fa-spin"></i>
+        <a href="." >Persistence</a>
+    </h1>
+</div>
+
+
+
+
+                    <div class="page-wrapper" tabindex="-1" role="main">
+                        <div class="page-inner">
+                            
+<div id="book-search-results">
+    <div class="search-noresults">
+    
+                                <section class="normal markdown-section">
+                                
+                                <h1 id="persistence">Persistence</h1>
+<p>In this chapter we will describe how persistence works with Apache ActiveMQ Artemis and
+how to configure it.</p>
+<p>Apache ActiveMQ Artemis ships with two persistence options.  The Apache ActiveMQ Artemis File journal
+which is highly optimized for the messaging use case and gives great performance, and also Apache Artemis
+JDBC Store, which uses JDBC to connect to a database of your choice.  The JDBC Store is still under development,
+but it is possible to use it&apos;s journal features, (essentially everything except for paging and large messages).</p>
+<h2 id="apache-activemq-artemis-file-journal-default">Apache ActiveMQ Artemis File Journal (Default)</h2>
+<p>An Apache ActiveMQ Artemis file journal is an <em>append only</em> journal. It consists of a set of
+files on disk. Each file is pre-created to a fixed size and initially
+filled with padding. As operations are performed on the server, e.g. add
+message, update message, delete message, records are appended to the
+journal. When one journal file is full we move to the next one.</p>
+<p>Because records are only appended, i.e. added to the end of the journal
+we minimise disk head movement, i.e. we minimise random access
+operations which is typically the slowest operation on a disk.</p>
+<p>Making the file size configurable means that an optimal size can be
+chosen, i.e. making each file fit on a disk cylinder. Modern disk
+topologies are complex and we are not in control over which cylinder(s)
+the file is mapped onto so this is not an exact science. But by
+minimising the number of disk cylinders the file is using, we can
+minimise the amount of disk head movement, since an entire disk cylinder
+is accessible simply by the disk rotating - the head does not have to
+move.</p>
+<p>As delete records are added to the journal, Apache ActiveMQ Artemis has a sophisticated
+file garbage collection algorithm which can determine if a particular
+journal file is needed any more - i.e. has all its data been deleted in
+the same or other files. If so, the file can be reclaimed and re-used.</p>
+<p>Apache ActiveMQ Artemis also has a compaction algorithm which removes dead space from
+the journal and compresses up the data so it takes up less files on
+disk.</p>
+<p>The journal also fully supports transactional operation if required,
+supporting both local and XA transactions.</p>
+<p>The majority of the journal is written in Java, however we abstract out
+the interaction with the actual file system to allow different pluggable
+implementations. Apache ActiveMQ Artemis ships with two implementations:</p>
+<ul>
+<li><p>Java <a href="http://en.wikipedia.org/wiki/New_I/O" target="_blank">NIO</a>.</p>
+<p>The first implementation uses standard Java NIO to interface with
+the file system. This provides extremely good performance and runs
+on any platform where there&apos;s a Java 6+ runtime.</p>
+</li>
+<li><p>Linux Asynchronous IO</p>
+<p>The second implementation uses a thin native code wrapper to talk to
+the Linux asynchronous IO library (AIO). With AIO, Apache ActiveMQ Artemis will be
+called back when the data has made it to disk, allowing us to avoid
+explicit syncs altogether and simply send back confirmation of
+completion when AIO informs us that the data has been persisted.</p>
+<p>Using AIO will typically provide even better performance than using
+Java NIO.</p>
+<p>The AIO journal is only available when running Linux kernel 2.6 or
+later and after having installed libaio (if it&apos;s not already
+installed). For instructions on how to install libaio please see Installing AIO section.</p>
+<p>Also, please note that AIO will only work with the following file
+systems: ext2, ext3, ext4, jfs, xfs. With other file systems, e.g.
+NFS it may appear to work, but it will fall back to a slower
+synchronous behaviour. Don&apos;t put the journal on a NFS share!</p>
+<p>For more information on libaio please see <a href="libaio.html">lib AIO</a>.</p>
+<p>libaio is part of the kernel project.</p>
+</li>
+<li><p><a href="https://en.wikipedia.org/wiki/Memory-mapped_file" target="_blank">Memory mapped</a>.</p>
+<p>The third implementation uses a file-backed <a href="https://docs.oracle.com/javase/6/docs/api/java/nio/channels/FileChannel.MapMode.html#READ_WRITE" target="_blank">READ_WRITE</a>
+memory mapping against the OS page cache to interface with the file system.</p>
+<p>This provides extremely good performance (especially under strictly process failure durability requirements), 
+almost zero copy (actually <em>is</em> the kernel page cache) and zero garbage (from the Java HEAP perspective) operations and runs 
+on any platform where there&apos;s a Java 4+ runtime.</p>
+<p>Under power failure durability requirements it will perform at least on par with the NIO journal with the only 
+exception of Linux OS with kernel less or equals 2.6, in which the <a href="https://docs.oracle.com/javase/6/docs/api/java/nio/MappedByteBuffer.html#force(" target="_blank"><em>msync</em></a>) implementation necessary to ensure 
+durable writes was different (and slower) from the <a href="https://docs.oracle.com/javase/6/docs/api/java/nio/channels/FileChannel.html#force(boolean" target="_blank"><em>fsync</em></a>) used is case of NIO journal.</p>
+<p>It benefits by the configuration of OS <a href="https://en.wikipedia.org/wiki/Page_(computer_memory" target="_blank">huge pages</a>#Huge_pages),
+in particular when is used a big number of journal files and sizing them as multiple of the OS page size in bytes.    </p>
+</li>
+</ul>
+<p>The standard Apache ActiveMQ Artemis core server uses two instances of the journal:</p>
+<ul>
+<li><p>Bindings journal.</p>
+<p>This journal is used to store bindings related data. That includes
+the set of queues that are deployed on the server and their
+attributes. It also stores data such as id sequence counters.</p>
+<p>The bindings journal is always a NIO journal as it is typically low
+throughput compared to the message journal.</p>
+<p>The files on this journal are prefixed as <code>activemq-bindings</code>. Each
+file has a <code>bindings</code> extension. File size is <code>1048576</code>, and it is
+located at the bindings folder.</p>
+</li>
+<li><p>Message journal.</p>
+<p>This journal instance stores all message related data, including the
+message themselves and also duplicate-id caches.</p>
+<p>By default Apache ActiveMQ Artemis will try and use an AIO journal. If AIO is not
+available, e.g. the platform is not Linux with the correct kernel
+version or AIO has not been installed then it will automatically
+fall back to using Java NIO which is available on any Java platform.</p>
+<p>The files on this journal are prefixed as <code>activemq-data</code>. Each file
+has a <code>amq</code> extension. File size is by the default <code>10485760</code>
+(configurable), and it is located at the journal folder.</p>
+</li>
+</ul>
+<p>For large messages, Apache ActiveMQ Artemis persists them outside the message journal.
+This is discussed in <a href="large-messages.html">Large Messages</a>.</p>
+<p>Apache ActiveMQ Artemis can also be configured to page messages to disk in low memory
+situations. This is discussed in <a href="paging.html">Paging</a>.</p>
+<p>If no persistence is required at all, Apache ActiveMQ Artemis can also be configured
+not to persist any data at all to storage as discussed in the Configuring
+the broker for Zero Persistence section.</p>
+<h3 id="configuring-the-bindings-journal">Configuring the bindings journal</h3>
+<p>The bindings journal is configured using the following attributes in
+<code>broker.xml</code></p>
+<ul>
+<li><p><code>bindings-directory</code></p>
+<p>This is the directory in which the bindings journal lives. The
+default value is <code>data/bindings</code>.</p>
+</li>
+<li><p><code>create-bindings-dir</code></p>
+<p>If this is set to <code>true</code> then the bindings directory will be
+automatically created at the location specified in
+<code>bindings-directory</code> if it does not already exist. The default value
+is <code>true</code></p>
+</li>
+</ul>
+<h3 id="configuring-the-jms-journal">Configuring the jms journal</h3>
+<p>The jms config shares its configuration with the bindings journal.</p>
+<h3 id="configuring-the-message-journal">Configuring the message journal</h3>
+<p>The message journal is configured using the following attributes in
+<code>broker.xml</code></p>
+<ul>
+<li><p><code>journal-directory</code></p>
+<p>This is the directory in which the message journal lives. The
+default value is <code>data/journal</code>.</p>
+<p>For the best performance, we recommend the journal is located on its
+own physical volume in order to minimise disk head movement. If the
+journal is on a volume which is shared with other processes which
+might be writing other files (e.g. bindings journal, database, or
+transaction coordinator) then the disk head may well be moving
+rapidly between these files as it writes them, thus drastically
+reducing performance.</p>
+<p>When the message journal is stored on a SAN we recommend each
+journal instance that is stored on the SAN is given its own LUN
+(logical unit).</p>
+</li>
+<li><p><code>create-journal-dir</code></p>
+<p>If this is set to <code>true</code> then the journal directory will be
+automatically created at the location specified in
+<code>journal-directory</code> if it does not already exist. The default value
+is <code>true</code></p>
+</li>
+<li><p><code>journal-type</code></p>
+<p>Valid values are <code>NIO</code>, <code>ASYNCIO</code> or <code>MAPPED</code>.</p>
+<p>Choosing <code>NIO</code> chooses the Java NIO journal. Choosing <code>ASYNCIO</code> chooses
+the Linux asynchronous IO journal. If you choose <code>ASYNCIO</code> but are not
+running Linux or you do not have libaio installed then Apache ActiveMQ Artemis will
+detect this and automatically fall back to using <code>NIO</code>.
+Choosing <code>MAPPED</code> chooses the Java Memory Mapped journal.</p>
+</li>
+<li><p><code>journal-sync-transactional</code></p>
+<p>If this is set to true then Apache ActiveMQ Artemis will make sure all transaction
+data is flushed to disk on transaction boundaries (commit, prepare
+and rollback). The default value is <code>true</code>.</p>
+</li>
+<li><p><code>journal-sync-non-transactional</code></p>
+<p>If this is set to true then Apache ActiveMQ Artemis will make sure non
+transactional message data (sends and acknowledgements) are flushed
+to disk each time. The default value for this is <code>true</code>.</p>
+</li>
+<li><p><code>journal-file-size</code></p>
+<p>The size of each journal file in bytes. The default value for this
+is <code>10485760</code> bytes (10MiB).</p>
+</li>
+<li><p><code>journal-min-files</code></p>
+<p>The minimum number of files the journal will maintain. When Apache ActiveMQ Artemis
+starts and there is no initial message data, Apache ActiveMQ Artemis will
+pre-create <code>journal-min-files</code> number of files.</p>
+<p>Creating journal files and filling them with padding is a fairly
+expensive operation and we want to minimise doing this at run-time
+as files get filled. By pre-creating files, as one is filled the
+journal can immediately resume with the next one without pausing to
+create it.</p>
+<p>Depending on how much data you expect your queues to contain at
+steady state you should tune this number of files to match that
+total amount of data.</p>
+</li>
+<li><p><code>journal-pool-files</code></p>
+<p>The system will create as many files as needed however when reclaiming files
+it will shrink back to the <code>journal-pool-files</code>.</p>
+<p>The default to this parameter is -1, meaning it will never delete files on the journal once created.</p>
+<p>Notice that the system can&apos;t grow infinitely as you are still required to use paging for destinations that can
+grow indefinitely.</p>
+<p>Notice: in case you get too many files you can use <a href="tools.html">compacting</a>.</p>
+</li>
+<li><p><code>journal-max-io</code></p>
+<p>Write requests are queued up before being submitted to the system
+for execution. This parameter controls the maximum number of write
+requests that can be in the IO queue at any one time. If the queue
+becomes full then writes will block until space is freed up.</p>
+<p>When using NIO, this value should always be equal to <code>1</code></p>
+<p>When using AIO, the default should be <code>500</code>.</p>
+<p>The system maintains different defaults for this parameter depending
+on whether it&apos;s NIO or AIO (default for NIO is 1, default for AIO is
+500)</p>
+<p>There is a limit and the total max AIO can&apos;t be higher than what is
+configured at the OS level (/proc/sys/fs/aio-max-nr) usually at
+65536.</p>
+</li>
+<li><p><code>journal-buffer-timeout</code></p>
+<p>Instead of flushing on every write that requires a flush, we
+maintain an internal buffer, and flush the entire buffer either when
+it is full, or when a timeout expires, whichever is sooner. This is
+used for both NIO and AIO and allows the system to scale better with
+many concurrent writes that require flushing.</p>
+<p>This parameter controls the timeout at which the buffer will be
+flushed if it hasn&apos;t filled already. AIO can typically cope with a
+higher flush rate than NIO, so the system maintains different
+defaults for both NIO and AIO (default for NIO is 3333333
+nanoseconds - 300 times per second, default for AIO is 500000
+nanoseconds - ie. 2000 times per second).</p>
+<blockquote>
+<p><strong>Note</strong></p>
+<p>By increasing the timeout, you may be able to increase system
+throughput at the expense of latency, the default parameters are
+chosen to give a reasonable balance between throughput and
+latency.</p>
+</blockquote>
+</li>
+<li><p><code>journal-buffer-size</code></p>
+<p>The size of the timed buffer on AIO. The default value is <code>490KiB</code>.</p>
+</li>
+<li><p><code>journal-compact-min-files</code></p>
+<p>The minimal number of files before we can consider compacting the
+journal. The compacting algorithm won&apos;t start until you have at
+least <code>journal-compact-min-files</code></p>
+<p>Setting this to 0 will disable the feature to compact completely.
+This could be dangerous though as the journal could grow indefinitely.
+Use it wisely!</p>
+</li>
+</ul>
+<pre><code>The default for this parameter is `10`
+</code></pre><ul>
+<li><p><code>journal-compact-percentage</code></p>
+<p>The threshold to start compacting. When less than this percentage is
+considered live data, we start compacting. Note also that compacting
+won&apos;t kick in until you have at least <code>journal-compact-min-files</code>
+data files on the journal</p>
+<p>The default for this parameter is <code>30</code></p>
+</li>
+<li><p><code>journal-datasync</code> (default: true)</p>
+<p>This will disable the use of fdatasync on journal writes.
+When enabled it ensures full power failure durability, otherwise 
+process failure durability on journal writes (OS guaranteed).
+This is particular effective for <code>NIO</code> and <code>MAPPED</code> journals, which rely on 
+ <em>fsync</em>/<em>msync</em> to force write changes to disk.</p>
+</li>
+</ul>
+<h3 id="an-important-note-on-disabling-journal-datasync">An important note on disabling <code>journal-datasync</code>.</h3>
+<blockquote>
+<p>Any modern OS guarantees that on process failures (i.e. crash) all the uncommitted changes
+to the page cache will be flushed to the file system, maintaining coherence between 
+subsequent operations against the same pages and ensuring that no data will be lost.
+The predictability of the timing of such flushes, in case of a disabled <em>journal-datasync</em>,
+depends on the OS configuration, but without compromising (or relaxing) the process 
+failure durability semantics as described above.
+Rely on the OS page cache sacrifice the power failure protection, while increasing the 
+effectiveness of the journal operations, capable of exploiting 
+the read caching and write combining features provided by the OS&apos;s kernel page cache subsystem.</p>
+</blockquote>
+<h3 id="an-important-note-on-disabling-disk-write-cache">An important note on disabling disk write cache.</h3>
+<blockquote>
+<p><strong>Warning</strong></p>
+<p>Most disks contain hardware write caches. A write cache can increase
+the apparent performance of the disk because writes just go into the
+cache and are then lazily written to the disk later.</p>
+<p>This happens irrespective of whether you have executed a fsync() from
+the operating system or correctly synced data from inside a Java
+program!</p>
+<p>By default many systems ship with disk write cache enabled. This means
+that even after syncing from the operating system there is no
+guarantee the data has actually made it to disk, so if a failure
+occurs, critical data can be lost.</p>
+<p>Some more expensive disks have non volatile or battery backed write
+caches which won&apos;t necessarily lose data on event of failure, but you
+need to test them!</p>
+<p>If your disk does not have an expensive non volatile or battery backed
+cache and it&apos;s not part of some kind of redundant array (e.g. RAID),
+and you value your data integrity you need to make sure disk write
+cache is disabled.</p>
+<p>Be aware that disabling disk write cache can give you a nasty shock
+performance wise. If you&apos;ve been used to using disks with write cache
+enabled in their default setting, unaware that your data integrity
+could be compromised, then disabling it will give you an idea of how
+fast your disk can perform when acting really reliably.</p>
+<p>On Linux you can inspect and/or change your disk&apos;s write cache
+settings using the tools <code>hdparm</code> (for IDE disks) or <code>sdparm</code> or
+<code>sginfo</code> (for SDSI/SATA disks)</p>
+<p>On Windows you can check / change the setting by right clicking on the
+disk and clicking properties.</p>
+</blockquote>
+<h3 id="installing-aio">Installing AIO</h3>
+<p>The Java NIO journal gives great performance, but If you are running
+Apache ActiveMQ Artemis using Linux Kernel 2.6 or later, we highly recommend you use
+the <code>AIO</code> journal for the very best persistence performance.</p>
+<p>It&apos;s not possible to use the AIO journal under other operating systems
+or earlier versions of the Linux kernel.</p>
+<p>If you are running Linux kernel 2.6 or later and don&apos;t already have
+<code>libaio</code> installed, you can easily install it using the following steps:</p>
+<p>Using yum, (e.g. on Fedora or Red Hat Enterprise Linux):</p>
+<pre><code>yum install libaio
+</code></pre><p>Using aptitude, (e.g. on Ubuntu or Debian system):</p>
+<pre><code>apt-get install libaio
+</code></pre><h2 id="apache-activemq-artemis-jdbc-persistence">Apache ActiveMQ Artemis JDBC Persistence</h2>
+<p>WARNING: The Apache ActiveMQ Artemis JDBC persistence store is under development and is included for evaluation purposes.</p>
+<p>The Apache ActiveMQ Artemis JDBC persistence layer offers the ability to store broker state (Messages, Addresses and other
+application state) using a database.  N.B. Address full policy Paging (See: <a href="paging.html">The section on Paging</a>) is currently not
+supported with the JDBC persistence layer.</p>
+<p>Using the ActiveMQ Artemis File Journal is the recommended configuration as it offers higher levels of performance and is
+more mature.  The JDBC persistence layer is targeted to those users who must use a database e.g. due to internal company
+policy.</p>
+<p>ActiveMQ Artemis currently has support for a limited number of database vendors (older versions may work but mileage may
+vary):</p>
+<ol>
+<li>PostgreSQL 9.4.x</li>
+<li>MySQL 5.7.x</li>
+<li>Apache Derby 10.11.1.1</li>
+</ol>
+<p>The JDBC store uses a JDBC connection to store messages and bindings data in records in database tables.  The data stored
+in the database tables is encoded using Apache ActiveMQ Artemis internal encodings.</p>
+<h3 id="configuring-jdbc-persistence">Configuring JDBC Persistence</h3>
+<p>To configure Apache ActiveMQ Artemis to use a database for persisting messages and bindings data you must do two things.</p>
+<ol>
+<li><p>Add the appropriate JDBC driver libraries to the Artemis runtime.  You can do this by dropping the relevant jars in the lib folder of the ActiveMQ Artemis distribution.</p>
+</li>
+<li><p>Create a store element in your broker.xml config file under the <code>&lt;core&gt;</code> element.  For example:</p>
+</li>
+</ol>
+<pre><code class="lang-xml">      <span class="hljs-tag">&lt;<span class="hljs-name">store</span>&gt;</span>
+         <span class="hljs-tag">&lt;<span class="hljs-name">database-store</span>&gt;</span>
+            <span class="hljs-tag">&lt;<span class="hljs-name">jdbc-connection-url</span>&gt;</span>jdbc:derby:data/derby/database-store;create=true<span class="hljs-tag">&lt;/<span class="hljs-name">jdbc-connection-url</span>&gt;</span>
+            <span class="hljs-tag">&lt;<span class="hljs-name">bindings-table-name</span>&gt;</span>BINDINGS_TABLE<span class="hljs-tag">&lt;/<span class="hljs-name">bindings-table-name</span>&gt;</span>
+            <span class="hljs-tag">&lt;<span class="hljs-name">message-table-name</span>&gt;</span>MESSAGE_TABLE<span class="hljs-tag">&lt;/<span class="hljs-name">message-table-name</span>&gt;</span>
+            <span class="hljs-tag">&lt;<span class="hljs-name">page-store-table-name</span>&gt;</span>MESSAGE_TABLE<span class="hljs-tag">&lt;/<span class="hljs-name">page-store-table-name</span>&gt;</span>
+            <span class="hljs-tag">&lt;<span class="hljs-name">large-message-table-name</span>&gt;</span>LARGE_MESSAGES_TABLE<span class="hljs-tag">&lt;/<span class="hljs-name">large-message-table-name</span>&gt;</span>
+            <span class="hljs-tag">&lt;<span class="hljs-name">jdbc-driver-class-name</span>&gt;</span>org.apache.derby.jdbc.EmbeddedDriver<span class="hljs-tag">&lt;/<span class="hljs-name">jdbc-driver-class-name</span>&gt;</span>
+         <span class="hljs-tag">&lt;/<span class="hljs-name">database-store</span>&gt;</span>
+      <span class="hljs-tag">&lt;/<span class="hljs-name">store</span>&gt;</span>
+</code></pre>
+<ul>
+<li><p><code>jdbc-connection-url</code></p>
+<p>The full JDBC connection URL for your database server.  The connection url should include all configuration parameters and database name.  Note: When configuring the server using the XML configuration files please ensure to escape any illegal chars; &quot;&amp;&quot; for example, is typical in JDBC connection url and should be escaped to &quot;&amp;&quot;.</p>
+</li>
+<li><p><code>bindings-table-name</code></p>
+<p>The name of the table in which bindings data will be persisted for the ActiveMQ Artemis server.  Specifying table names allows users to share single database amongst multiple servers, without interference.</p>
+</li>
+<li><p><code>message-table-name</code></p>
+<p>The name of the table in which bindings data will be persisted for the ActiveMQ Artemis server.  Specifying table names allows users to share single database amongst multiple servers, without interference.</p>
+</li>
+<li><p><code>large-message-table-name</code></p>
+<p>The name of the table in which messages and related data will be persisted for the ActiveMQ Artemis server.  Specifying table names allows users to share single database amongst multiple servers, without interference.</p>
+</li>
+<li><p><code>page-store-table-name</code></p>
+<p>The name of the table to house the page store directory information.  Note that each address will have it&apos;s own page table which will use this name appended with a unique id of up to 20 characters.</p>
+</li>
+<li><p><code>jdbc-driver-class-name</code></p>
+<p>The fully qualified class name of the desired database Driver.</p>
+</li>
+<li><p><code>jdbc-network-timeout</code></p>
+<p>The JDBC network connection timeout in milliseconds. The default value
+is 20000 milliseconds (ie 20 seconds).</p>
+</li>
+</ul>
+<p>Note that some DBMS (e.g. Oracle, 30 chars) have restrictions on the size of table names, this should be taken into consideration when configuring table names for the Artemis database store, pay particular attention to the page store table name, which can be appended with a unique ID of up to 20 characters.  (for Oracle this would mean configuring a page-store-table-name of max size of 10 chars).</p>
+<h2 id="configuring-apache-activemq-artemis-for-zero-persistence">Configuring Apache ActiveMQ Artemis for Zero Persistence</h2>
+<p>In some situations, zero persistence is sometimes required for a
+messaging system. Configuring Apache ActiveMQ Artemis to perform zero persistence is
+straightforward. Simply set the parameter <code>persistence-enabled</code> in
+<code>broker.xml</code> to <code>false</code>.</p>
+<p>Please note that if you set this parameter to false, then <em>zero</em>
+persistence will occur. That means no bindings data, message data, large
+message data, duplicate id caches or paging data will be persisted.</p>
+
+                                
+                                </section>
+                            
+    </div>
+    <div class="search-results">
+        <div class="has-results">
+            
+            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
+            <ul class="search-results-list"></ul>
+            
+        </div>
+        <div class="no-results">
+            
+            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
+            
+        </div>
+    </div>
+</div>
+
+                        </div>
+                    </div>
+                
+            </div>
+
+            
+                
+                <a href="filter-expressions.html" class="navigation navigation-prev " aria-label="Previous page: Filter Expressions">
+                    <i class="fa fa-angle-left"></i>
+                </a>
+                
+                
+                <a href="configuring-transports.html" class="navigation navigation-next " aria-label="Next page: Configuring Transports">
+                    <i class="fa fa-angle-right"></i>
+                </a>
+                
+            
+        
+    </div>
+
+    <script>
+        var gitbook = gitbook || [];
+        gitbook.push(function() {
+            gitbook.page.hasChanged({"page":{"title":"Persistence","level":"1.18","depth":1,"next":{"title":"Configuring Transports","level":"1.19","depth":1,"path":"configuring-transports.md","ref":"configuring-transports.md","articles":[]},"previous":{"title":"Filter Expressions","level":"1.17","depth":1,"path":"filter-expressions.md","ref":"filter-expressions.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":
 "styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"github":"apache/activemq-artemis","theme":"default","githubHost":"https://github.com/","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"ActiveMQ Artemis Documentation","links":{"home":"http://activemq.apache.org/artemis","issues":"https://issues.apache.org/jira/browse/ARTEMIS","contribute":"http://activemq.apache.org/contributing.html"},"gitbook":"3.x.x","description":"ActiveMQ Artemis User Guide and Reference Documentation"},"file":{"path":"persistence.md","mtime":"2017-09-08T01:26:53.000Z","type":"markdown"},"gitbook":{"version":"3.1.1","time":"2017-09-14T19:42:32.953Z"},"basePath":".","book":{"language":""}});
+        });
+    </script>
+</div>
+
+        
+    <script src="gitbook/gitbook.js"></script>
+    <script src="gitbook/theme.js"></script>
+    
+        
+        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-search/search.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
+        
+    
+
+    </body>
+</html>
+

Added: websites/production/activemq/content/artemis/docs/latest/pre-acknowledge.html
==============================================================================
--- websites/production/activemq/content/artemis/docs/latest/pre-acknowledge.html (added)
+++ websites/production/activemq/content/artemis/docs/latest/pre-acknowledge.html Thu Sep 14 19:48:11 2017
@@ -0,0 +1,1125 @@
+
+<!DOCTYPE HTML>
+<html lang="" >
+    <head>
+        <title>Extra Acknowledge Modes · ActiveMQ Artemis Documentation</title>
+        <meta charset="UTF-8">
+        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
+        <meta name="description" content="">
+        <meta name="generator" content="GitBook 3.1.1">
+        
+        
+        
+    
+    <link rel="stylesheet" href="gitbook/style.css">
+
+    
+            
+                
+                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
+                
+            
+                
+                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
+                
+            
+                
+                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
+                
+            
+        
+
+    
+
+    
+        
+    
+        
+    
+        
+    
+        
+    
+        
+    
+        
+    
+
+        
+    
+    
+    <meta name="HandheldFriendly" content="true"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
+    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
+
+    
+    <link rel="next" href="management.html" />
+    
+    
+    <link rel="prev" href="message-grouping.html" />
+    
+
+    </head>
+    <body>
+        
+<div class="book">
+    <div class="book-summary">
+        
+            
+<div id="book-search-input" role="search">
+    <input type="text" placeholder="Type to search" />
+</div>
+
+            
+                <nav role="navigation">
+                
+
+
+<ul class="summary">
+    
+    
+
+    
+
+    
+        
+        
+    
+        <li class="chapter " data-level="1.1" data-path="./">
+            
+                <a href="./">
+            
+                    
+                    Introduction
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.2" data-path="notice.html">
+            
+                <a href="notice.html">
+            
+                    
+                    Legal Notice
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.3" data-path="preface.html">
+            
+                <a href="preface.html">
+            
+                    
+                    Preface
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.4" data-path="project-info.html">
+            
+                <a href="project-info.html">
+            
+                    
+                    Project Info
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.5" data-path="messaging-concepts.html">
+            
+                <a href="messaging-concepts.html">
+            
+                    
+                    Messaging Concepts
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.6" data-path="architecture.html">
+            
+                <a href="architecture.html">
+            
+                    
+                    Architecture
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.7" data-path="using-server.html">
+            
+                <a href="using-server.html">
+            
+                    
+                    Using the Server
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.8" data-path="address-model.html">
+            
+                <a href="address-model.html">
+            
+                    
+                    Address Model
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.9" data-path="using-jms.html">
+            
+                <a href="using-jms.html">
+            
+                    
+                    Using JMS
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.10" data-path="using-core.html">
+            
+                <a href="using-core.html">
+            
+                    
+                    Using Core
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.11" data-path="using-AMQP.html">
+            
+                <a href="using-AMQP.html">
+            
+                    
+                    Using AMQP
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.12" data-path="jms-core-mapping.html">
+            
+                <a href="jms-core-mapping.html">
+            
+                    
+                    Mapping JMS Concepts to the Core API
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.13" data-path="client-classpath.html">
+            
+                <a href="client-classpath.html">
+            
+                    
+                    The Client Classpath
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.14" data-path="examples.html">
+            
+                <a href="examples.html">
+            
+                    
+                    Examples
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.15" data-path="wildcard-routing.html">
+            
+                <a href="wildcard-routing.html">
+            
+                    
+                    Routing Messages With Wild Cards
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.16" data-path="wildcard-syntax.html">
+            
+                <a href="wildcard-syntax.html">
+            
+                    
+                    Understanding the Apache ActiveMQ Artemis Wildcard Syntax
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.17" data-path="filter-expressions.html">
+            
+                <a href="filter-expressions.html">
+            
+                    
+                    Filter Expressions
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.18" data-path="persistence.html">
+            
+                <a href="persistence.html">
+            
+                    
+                    Persistence
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.19" data-path="configuring-transports.html">
+            
+                <a href="configuring-transports.html">
+            
+                    
+                    Configuring Transports
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.20" data-path="config-reload.html">
+            
+                <a href="config-reload.html">
+            
+                    
+                    Configuration Reload
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.21" data-path="connection-ttl.html">
+            
+                <a href="connection-ttl.html">
+            
+                    
+                    Detecting Dead Connections
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.22" data-path="slow-consumers.html">
+            
+                <a href="slow-consumers.html">
+            
+                    
+                    Detecting Slow Consumers
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.23" data-path="network-isolation.html">
+            
+                <a href="network-isolation.html">
+            
+                    
+                    Avoiding Network Isolation
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.24" data-path="critical-analysis.html">
+            
+                <a href="critical-analysis.html">
+            
+                    
+                    Detecting Broker Issues (Critical Analysis)
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.25" data-path="transaction-config.html">
+            
+                <a href="transaction-config.html">
+            
+                    
+                    Resource Manager Configuration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.26" data-path="flow-control.html">
+            
+                <a href="flow-control.html">
+            
+                    
+                    Flow Control
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.27" data-path="send-guarantees.html">
+            
+                <a href="send-guarantees.html">
+            
+                    
+                    Guarantees of sends and commits
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.28" data-path="undelivered-messages.html">
+            
+                <a href="undelivered-messages.html">
+            
+                    
+                    Message Redelivery and Undelivered Messages
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.29" data-path="message-expiry.html">
+            
+                <a href="message-expiry.html">
+            
+                    
+                    Message Expiry
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.30" data-path="large-messages.html">
+            
+                <a href="large-messages.html">
+            
+                    
+                    Large Messages
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.31" data-path="paging.html">
+            
+                <a href="paging.html">
+            
+                    
+                    Paging
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.32" data-path="queue-attributes.html">
+            
+                <a href="queue-attributes.html">
+            
+                    
+                    Queue Attributes
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.33" data-path="scheduled-messages.html">
+            
+                <a href="scheduled-messages.html">
+            
+                    
+                    Scheduled Messages
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.34" data-path="last-value-queues.html">
+            
+                <a href="last-value-queues.html">
+            
+                    
+                    Last-Value Queues
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.35" data-path="message-grouping.html">
+            
+                <a href="message-grouping.html">
+            
+                    
+                    Message Grouping
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter active" data-level="1.36" data-path="pre-acknowledge.html">
+            
+                <a href="pre-acknowledge.html">
+            
+                    
+                    Extra Acknowledge Modes
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.37" data-path="management.html">
+            
+                <a href="management.html">
+            
+                    
+                    Management
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.38" data-path="management-console.html">
+            
+                <a href="management-console.html">
+            
+                    
+                    Management Console
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.39" data-path="security.html">
+            
+                <a href="security.html">
+            
+                    
+                    Security
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.40" data-path="broker-plugins.html">
+            
+                <a href="broker-plugins.html">
+            
+                    
+                    Broker Plugins
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.41" data-path="resource-limits.html">
+            
+                <a href="resource-limits.html">
+            
+                    
+                    Resource Limits
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.42" data-path="jms-bridge.html">
+            
+                <a href="jms-bridge.html">
+            
+                    
+                    The JMS Bridge
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.43" data-path="client-reconnection.html">
+            
+                <a href="client-reconnection.html">
+            
+                    
+                    Client Reconnection and Session Reattachment
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.44" data-path="diverts.html">
+            
+                <a href="diverts.html">
+            
+                    
+                    Diverting and Splitting Message Flows
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.45" data-path="core-bridges.html">
+            
+                <a href="core-bridges.html">
+            
+                    
+                    Core Bridges
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.46" data-path="duplicate-detection.html">
+            
+                <a href="duplicate-detection.html">
+            
+                    
+                    Duplicate Message Detection
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.47" data-path="clusters.html">
+            
+                <a href="clusters.html">
+            
+                    
+                    Clusters
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.48" data-path="ha.html">
+            
+                <a href="ha.html">
+            
+                    
+                    High Availability and Failover
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.49" data-path="graceful-shutdown.html">
+            
+                <a href="graceful-shutdown.html">
+            
+                    
+                    Graceful Server Shutdown
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.50" data-path="libaio.html">
+            
+                <a href="libaio.html">
+            
+                    
+                    Libaio Native Libraries
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.51" data-path="thread-pooling.html">
+            
+                <a href="thread-pooling.html">
+            
+                    
+                    Thread management
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.52" data-path="logging.html">
+            
+                <a href="logging.html">
+            
+                    
+                    Logging
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.53" data-path="rest.html">
+            
+                <a href="rest.html">
+            
+                    
+                    REST Interface
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.54" data-path="embedding-activemq.html">
+            
+                <a href="embedding-activemq.html">
+            
+                    
+                    Embedding Apache ActiveMQ Artemis
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.55" data-path="karaf.html">
+            
+                <a href="karaf.html">
+            
+                    
+                    Apache Karaf
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.56" data-path="spring-integration.html">
+            
+                <a href="spring-integration.html">
+            
+                    
+                    Spring Integration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.57" data-path="cdi-integration.html">
+            
+                <a href="cdi-integration.html">
+            
+                    
+                    CDI Integration
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.58" data-path="intercepting-operations.html">
+            
+                <a href="intercepting-operations.html">
+            
+                    
+                    Intercepting Operations
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.59" data-path="protocols-interoperability.html">
+            
+                <a href="protocols-interoperability.html">
+            
+                    
+                    Protocols and Interoperability
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.60" data-path="tools.html">
+            
+                <a href="tools.html">
+            
+                    
+                    Tools
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.61" data-path="maven-plugin.html">
+            
+                <a href="maven-plugin.html">
+            
+                    
+                    Maven Plugin
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.62" data-path="unit-testing.html">
+            
+                <a href="unit-testing.html">
+            
+                    
+                    Unit Testing
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.63" data-path="perf-tuning.html">
+            
+                <a href="perf-tuning.html">
+            
+                    
+                    Troubleshooting and Performance Tuning
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.64" data-path="configuration-index.html">
+            
+                <a href="configuration-index.html">
+            
+                    
+                    Configuration Reference
+            
+                </a>
+            
+
+            
+        </li>
+    
+        <li class="chapter " data-level="1.65" data-path="updating-artemis.html">
+            
+                <a href="updating-artemis.html">
+            
+                    
+                    Updating Artemis
+            
+                </a>
+            
+
+            
+        </li>
+    
+
+    
+
+    <li class="divider"></li>
+
+    <li>
+        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
+            Published with GitBook
+        </a>
+    </li>
+</ul>
+
+
+                </nav>
+            
+        
+    </div>
+
+    <div class="book-body">
+        
+            <div class="body-inner">
+                
+                    
+
+<div class="book-header" role="navigation">
+    
+
+    <!-- Title -->
+    <h1>
+        <i class="fa fa-circle-o-notch fa-spin"></i>
+        <a href="." >Extra Acknowledge Modes</a>
+    </h1>
+</div>
+
+
+
+
+                    <div class="page-wrapper" tabindex="-1" role="main">
+                        <div class="page-inner">
+                            
+<div id="book-search-results">
+    <div class="search-noresults">
+    
+                                <section class="normal markdown-section">
+                                
+                                <h1 id="extra-acknowledge-modes">Extra Acknowledge Modes</h1>
+<p>JMS specifies 3 acknowledgement modes:</p>
+<ul>
+<li><p><code>AUTO_ACKNOWLEDGE</code></p>
+</li>
+<li><p><code>CLIENT_ACKNOWLEDGE</code></p>
+</li>
+<li><p><code>DUPS_OK_ACKNOWLEDGE</code></p>
+</li>
+</ul>
+<p>Apache ActiveMQ Artemis supports two additional modes: <code>PRE_ACKNOWLEDGE</code> and
+<code>INDIVIDUAL_ACKNOWLEDGE</code></p>
+<p>In some cases you can afford to lose messages in event of failure, so it
+would make sense to acknowledge the message on the server <em>before</em>
+delivering it to the client.</p>
+<p>This extra mode is supported by Apache ActiveMQ Artemis and will call it
+<em>pre-acknowledge</em> mode.</p>
+<p>The disadvantage of acknowledging on the server before delivery is that
+the message will be lost if the system crashes <em>after</em> acknowledging the
+message on the server but <em>before</em> it is delivered to the client. In
+that case, the message is lost and will not be recovered when the system
+restart.</p>
+<p>Depending on your messaging case, <code>preAcknowledgement</code> mode can avoid
+extra network traffic and CPU at the cost of coping with message loss.</p>
+<p>An example of a use case for pre-acknowledgement is for stock price
+update messages. With these messages it might be reasonable to lose a
+message in event of crash, since the next price update message will
+arrive soon, overriding the previous price.</p>
+<blockquote>
+<p><strong>Note</strong></p>
+<p>Please note, that if you use pre-acknowledge mode, then you will lose
+transactional semantics for messages being consumed, since clearly
+they are being acknowledged first on the server, not when you commit
+the transaction. This may be stating the obvious but we like to be
+clear on these things to avoid confusion!</p>
+</blockquote>
+<h2 id="using-preacknowledge">Using PRE_ACKNOWLEDGE</h2>
+<p>This can be configured by setting the boolean URL parameter <code>preAcknowledge</code>
+to <code>true</code>.</p>
+<p>Alternatively, when using the JMS API, create a JMS Session with the
+<code>ActiveMQSession.PRE_ACKNOWLEDGE</code> constant.</p>
+<pre><code>// messages will be acknowledge on the server *before* being delivered to the client
+Session session = connection.createSession(false, ActiveMQJMSConstants.PRE_ACKNOWLEDGE);
+</code></pre><h2 id="individual-acknowledge">Individual Acknowledge</h2>
+<p>A valid use-case for individual acknowledgement would be when you need
+to have your own scheduling and you don&apos;t know when your message
+processing will be finished. You should prefer having one consumer per
+thread worker but this is not possible in some circumstances depending
+on how complex is your processing. For that you can use the individual
+acknowledgement.</p>
+<p>You basically setup Individual ACK by creating a session with the
+acknowledge mode with <code>ActiveMQJMSConstants.INDIVIDUAL_ACKNOWLEDGE</code>.
+Individual ACK inherits all the semantics from Client Acknowledge, with
+the exception the message is individually acked.</p>
+<blockquote>
+<p><strong>Note</strong></p>
+<p>Please note, that to avoid confusion on MDB processing, Individual
+ACKNOWLEDGE is not supported through MDBs (or the inbound resource
+adapter). this is because you have to finish the process of your
+message inside the MDB.</p>
+</blockquote>
+<h2 id="example">Example</h2>
+<p>See the <a href="examples.html">examples</a> chapter for an example which shows how to
+use pre-acknowledgement mode with JMS.</p>
+
+                                
+                                </section>
+                            
+    </div>
+    <div class="search-results">
+        <div class="has-results">
+            
+            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
+            <ul class="search-results-list"></ul>
+            
+        </div>
+        <div class="no-results">
+            
+            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
+            
+        </div>
+    </div>
+</div>
+
+                        </div>
+                    </div>
+                
+            </div>
+
+            
+                
+                <a href="message-grouping.html" class="navigation navigation-prev " aria-label="Previous page: Message Grouping">
+                    <i class="fa fa-angle-left"></i>
+                </a>
+                
+                
+                <a href="management.html" class="navigation navigation-next " aria-label="Next page: Management">
+                    <i class="fa fa-angle-right"></i>
+                </a>
+                
+            
+        
+    </div>
+
+    <script>
+        var gitbook = gitbook || [];
+        gitbook.push(function() {
+            gitbook.page.hasChanged({"page":{"title":"Extra Acknowledge Modes","level":"1.36","depth":1,"next":{"title":"Management","level":"1.37","depth":1,"path":"management.md","ref":"management.md","articles":[]},"previous":{"title":"Message Grouping","level":"1.35","depth":1,"path":"message-grouping.md","ref":"message-grouping.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"sty
 les/ebook.css","print":"styles/print.css"},"showLevel":false}},"github":"apache/activemq-artemis","theme":"default","githubHost":"https://github.com/","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"ActiveMQ Artemis Documentation","links":{"home":"http://activemq.apache.org/artemis","issues":"https://issues.apache.org/jira/browse/ARTEMIS","contribute":"http://activemq.apache.org/contributing.html"},"gitbook":"3.x.x","description":"ActiveMQ Artemis User Guide and Reference Documentation"},"file":{"path":"pre-acknowledge.md","mtime":"2017-09-08T01:26:53.000Z","type":"markdown"},"gitbook":{"version":"3.1.1","time":"2017-09-14T19:42:32.953Z"},"basePath":".","book":{"language":""}});
+        });
+    </script>
+</div>
+
+        
+    <script src="gitbook/gitbook.js"></script>
+    <script src="gitbook/theme.js"></script>
+    
+        
+        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-search/search.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
+        
+    
+        
+        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
+        
+    
+
+    </body>
+</html>
+



Mime
View raw message