Added: websites/production/activemq/content/artemis/docs/latest/send-guarantees.html ============================================================================== --- websites/production/activemq/content/artemis/docs/latest/send-guarantees.html (added) +++ websites/production/activemq/content/artemis/docs/latest/send-guarantees.html Thu Sep 14 19:48:11 2017 @@ -0,0 +1,1174 @@ + +<!DOCTYPE HTML> +<html lang="" > + <head> + <title>Guarantees of sends and commits · 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="undelivered-messages.html" /> + + + <link rel="prev" href="flow-control.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 active" 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="." >Guarantees of sends and commits</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="guarantees-of-sends-and-commits">Guarantees of sends and commits</h1> +<h2 id="guarantees-of-transaction-completion">Guarantees of Transaction Completion</h2> +<p>When committing or rolling back a transaction with Apache ActiveMQ Artemis, the request +to commit or rollback is sent to the server, and the call will block on +the client side until a response has been received from the server that +the commit or rollback was executed.</p> +<p>When the commit or rollback is received on the server, it will be +committed to the journal, and depending on the value of the parameter +<code>journal-sync-transactional</code> the server will ensure that the commit or +rollback is durably persisted to storage before sending the response +back to the client. If this parameter has the value <code>false</code> then commit +or rollback may not actually get persisted to storage until some time +after the response has been sent to the client. In event of server +failure this may mean the commit or rollback never gets persisted to +storage. The default value of this parameter is <code>true</code> so the client can +be sure all transaction commits or rollbacks have been persisted to +storage by the time the call to commit or rollback returns.</p> +<p>Setting this parameter to <code>false</code> can improve performance at the expense +of some loss of transaction durability.</p> +<p>This parameter is set in <code>broker.xml</code></p> +<h2 id="guarantees-of-non-transactional-message-sends">Guarantees of Non Transactional Message Sends</h2> +<p>If you are sending messages to a server using a non transacted session, +Apache ActiveMQ Artemis can be configured to block the call to send until the message +has definitely reached the server, and a response has been sent back to +the client. This can be configured individually for durable and +non-durable messages, and is determined by the following two URL parameters:</p> +<ul> +<li><p><code>blockOnDurableSend</code>. If this is set to <code>true</code> then all calls to +send for durable messages on non transacted sessions will block +until the message has reached the server, and a response has been +sent back. The default value is <code>true</code>.</p> +</li> +<li><p><code>blockOnNonDurableSend</code>. If this is set to <code>true</code> then all calls to +send for non-durable messages on non transacted sessions will block +until the message has reached the server, and a response has been +sent back. The default value is <code>false</code>.</p> +</li> +</ul> +<p>Setting block on sends to <code>true</code> can reduce performance since each send +requires a network round trip before the next send can be performed. +This means the performance of sending messages will be limited by the +network round trip time (RTT) of your network, rather than the bandwidth +of your network. For better performance we recommend either batching +many messages sends together in a transaction since with a transactional +session, only the commit / rollback blocks not every send, or, using +Apache ActiveMQ Artemis's advanced <em>asynchronous send acknowledgements feature</em> +described in Asynchronous Send Acknowledgements.</p> +<p>When the server receives a message sent from a non transactional +session, and that message is durable and the message is routed to at +least one durable queue, then the server will persist the message in +permanent storage. If the journal parameter +<code>journal-sync-non-transactional</code> is set to <code>true</code> the server will not +send a response back to the client until the message has been persisted +and the server has a guarantee that the data has been persisted to disk. +The default value for this parameter is <code>true</code>.</p> +<h2 id="guarantees-of-non-transactional-acknowledgements">Guarantees of Non Transactional Acknowledgements</h2> +<p>If you are acknowledging the delivery of a message at the client side +using a non transacted session, Apache ActiveMQ Artemis can be configured to block the +call to acknowledge until the acknowledge has definitely reached the +server, and a response has been sent back to the client. This is +configured with the parameter <code>BlockOnAcknowledge</code>. If this is set to +<code>true</code> then all calls to acknowledge on non transacted sessions will +block until the acknowledge has reached the server, and a response has +been sent back. You might want to set this to <code>true</code> if you want to +implement a strict <em>at most once</em> delivery policy. The default value is +<code>false</code></p> +<h2 id="asynchronous-send-acknowledgements">Asynchronous Send Acknowledgements</h2> +<p>If you are using a non transacted session but want a guarantee that +every message sent to the server has reached it, then, as discussed in +Guarantees of Non Transactional Message Sends, you can configure Apache ActiveMQ Artemis to block the call to send until the server +has received the message, persisted it and sent back a response. This +works well but has a severe performance penalty - each call to send +needs to block for at least the time of a network round trip (RTT) - the +performance of sending is thus limited by the latency of the network, +<em>not</em> limited by the network bandwidth.</p> +<p>Let's do a little bit of maths to see how severe that is. We'll consider +a standard 1Gib ethernet network with a network round trip between the +server and the client of 0.25 ms.</p> +<p>With a RTT of 0.25 ms, the client can send <em>at most</em> 1000/ 0.25 = 4000 +messages per second if it blocks on each message send.</p> +<p>If each message is < 1500 bytes and a standard 1500 bytes MTU (Maximum Transmission Unit) size is +used on the network, then a 1GiB network has a <em>theoretical</em> upper limit +of (1024 * 1024 * 1024 / 8) / 1500 = 89478 messages per second if +messages are sent without blocking! These figures aren't an exact +science but you can clearly see that being limited by network RTT can +have serious effect on performance.</p> +<p>To remedy this, Apache ActiveMQ Artemis provides an advanced new feature called +<em>asynchronous send acknowledgements</em>. With this feature, Apache ActiveMQ Artemis can be +configured to send messages without blocking in one direction and +asynchronously getting acknowledgement from the server that the messages +were received in a separate stream. By de-coupling the send from the +acknowledgement of the send, the system is not limited by the network +RTT, but is limited by the network bandwidth. Consequently better +throughput can be achieved than is possible using a blocking approach, +while at the same time having absolute guarantees that messages have +successfully reached the server.</p> +<p>The window size for send acknowledgements is determined by the +confirmation-window-size parameter on the connection factory or client +session factory. Please see <a href="client-reconnection.html">Client Reconnection and Session Reattachment</a> for more info on this.</p> +<h1 id="asynchronous-send-acknowledgements">Asynchronous Send Acknowledgements</h1> +<p>To use the feature using the core API, you implement the interface +<code>org.apache.activemq.artemis.api.core.client.SendAcknowledgementHandler</code> and set +a handler instance on your <code>ClientSession</code>.</p> +<p>Then, you just send messages as normal using your <code>ClientSession</code>, and +as messages reach the server, the server will send back an +acknowledgement of the send asynchronously, and some time later you are +informed at the client side by Apache ActiveMQ Artemis calling your handler's +<code>sendAcknowledged(ClientMessage message)</code> method, passing in a reference +to the message that was sent.</p> +<p>To enable asynchronous send acknowledgements you must make sure +<code>confirmationWindowSize</code> is set to a positive integer value, e.g. +10MiB</p> +<p>Please see <a href="examples.html">the examples chapter</a> for a full working example.</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="flow-control.html" class="navigation navigation-prev " aria-label="Previous page: Flow Control"> + <i class="fa fa-angle-left"></i> + </a> + + + <a href="undelivered-messages.html" class="navigation navigation-next " aria-label="Next page: Message Redelivery and Undelivered Messages"> + <i class="fa fa-angle-right"></i> + </a> + + + + </div> + + <script> + var gitbook = gitbook || []; + gitbook.push(function() { + gitbook.page.hasChanged({"page":{"title":"Guarantees of sends and commits","level":"1.27","depth":1,"next":{"title":"Message Redelivery and Undelivered Messages","level":"1.28","depth":1,"path":"undelivered-messages.md","ref":"undelivered-messages.md","articles":[]},"previous":{"title":"Flow Control","level":"1.26","depth":1,"path":"flow-control.md","ref":"flow-control.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":"style s/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":"send-guarantees.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/slow-consumers.html ============================================================================== --- websites/production/activemq/content/artemis/docs/latest/slow-consumers.html (added) +++ websites/production/activemq/content/artemis/docs/latest/slow-consumers.html Thu Sep 14 19:48:11 2017 @@ -0,0 +1,1091 @@ + +<!DOCTYPE HTML> +<html lang="" > + <head> + <title>Detecting Slow Consumers · 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="network-isolation.html" /> + + + <link rel="prev" href="connection-ttl.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 active" 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="." >Detecting Slow Consumers</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="detecting-slow-consumers">Detecting Slow Consumers</h1> +<p>In this section we will discuss how Apache ActiveMQ Artemis can be configured to deal +with slow consumers. A slow consumer with a server-side queue (e.g. JMS +topic subscriber) can pose a significant problem for broker performance. +If messages build up in the consumer's server-side queue then memory +will begin filling up and the broker may enter paging mode which would +impact performance negatively. However, criteria can be set so that +consumers which don't acknowledge messages quickly enough can +potentially be disconnected from the broker which in the case of a +non-durable JMS subscriber would allow the broker to remove the +subscription and all of its messages freeing up valuable server +resources.</p> +<h2 id="configuration-required-for-detecting-slow-consumers">Configuration required for detecting slow consumers</h2> +<p>By default the server will not detect slow consumers. If slow consumer +detection is desired then see <a href="queue-attributes.html">queue attributes chapter</a> +for more details.</p> +<p>The calculation to determine whether or not a consumer is slow only +inspects the number of messages a particular consumer has +<em>acknowledged</em>. It doesn't take into account whether or not flow control +has been enabled on the consumer, whether or not the consumer is +streaming a large message, etc. Keep this in mind when configuring slow +consumer detection.</p> +<p>Please note that slow consumer checks are performed using the scheduled +thread pool and that each queue on the broker with slow consumer +detection enabled will cause a new entry in the internal +<code>java.util.concurrent.ScheduledThreadPoolExecutor</code> instance. If there +are a high number of queues and the <code>slow-consumer-check-period</code> is +relatively low then there may be delays in executing some of the checks. +However, this will not impact the accuracy of the calculations used by +the detection algorithm. See <a href="thread-pooling.html">thread pooling</a> for more details about this pool.</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="connection-ttl.html" class="navigation navigation-prev " aria-label="Previous page: Detecting Dead Connections"> + <i class="fa fa-angle-left"></i> + </a> + + + <a href="network-isolation.html" class="navigation navigation-next " aria-label="Next page: Avoiding Network Isolation"> + <i class="fa fa-angle-right"></i> + </a> + + + + </div> + + <script> + var gitbook = gitbook || []; + gitbook.push(function() { + gitbook.page.hasChanged({"page":{"title":"Detecting Slow Consumers","level":"1.22","depth":1,"next":{"title":"Avoiding Network Isolation","level":"1.23","depth":1,"path":"network-isolation.md","ref":"network-isolation.md","articles":[]},"previous":{"title":"Detecting Dead Connections","level":"1.21","depth":1,"path":"connection-ttl.md","ref":"connection-ttl.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":"slow-consumers.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> +
