Added: websites/production/activemq/content/artemis/docs/1.5.4/karaf.html ============================================================================== --- websites/production/activemq/content/artemis/docs/1.5.4/karaf.html (added) +++ websites/production/activemq/content/artemis/docs/1.5.4/karaf.html Sun Mar 12 16:08:18 2017 @@ -0,0 +1,1052 @@ + +<!DOCTYPE HTML> +<html lang="" > + <head> + <title>Apache Karaf · 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="spring-integration.html" /> + + + <link rel="prev" href="embedding-activemq.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="using-jms.html"> + + <a href="using-jms.html"> + + + Using JMS + + </a> + + + + </li> + + <li class="chapter " data-level="1.9" data-path="using-core.html"> + + <a href="using-core.html"> + + + Using Core + + </a> + + + + </li> + + <li class="chapter " data-level="1.10" 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.11" data-path="client-classpath.html"> + + <a href="client-classpath.html"> + + + The Client Classpath + + </a> + + + + </li> + + <li class="chapter " data-level="1.12" data-path="examples.html"> + + <a href="examples.html"> + + + Examples + + </a> + + + + </li> + + <li class="chapter " data-level="1.13" data-path="wildcard-routing.html"> + + <a href="wildcard-routing.html"> + + + Routing Messages With Wild Cards + + </a> + + + + </li> + + <li class="chapter " data-level="1.14" 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.15" data-path="filter-expressions.html"> + + <a href="filter-expressions.html"> + + + Filter Expressions + + </a> + + + + </li> + + <li class="chapter " data-level="1.16" data-path="persistence.html"> + + <a href="persistence.html"> + + + Persistence + + </a> + + + + </li> + + <li class="chapter " data-level="1.17" data-path="configuring-transports.html"> + + <a href="configuring-transports.html"> + + + Configuring Transports + + </a> + + + + </li> + + <li class="chapter " data-level="1.18" data-path="config-reload.html"> + + <a href="config-reload.html"> + + + Configuration Reload + + </a> + + + + </li> + + <li class="chapter " data-level="1.19" data-path="connection-ttl.html"> + + <a href="connection-ttl.html"> + + + Detecting Dead Connections + + </a> + + + + </li> + + <li class="chapter " data-level="1.20" data-path="slow-consumers.html"> + + <a href="slow-consumers.html"> + + + Detecting Slow Consumers + + </a> + + + + </li> + + <li class="chapter " data-level="1.21" data-path="transaction-config.html"> + + <a href="transaction-config.html"> + + + Resource Manager Configuration + + </a> + + + + </li> + + <li class="chapter " data-level="1.22" data-path="flow-control.html"> + + <a href="flow-control.html"> + + + Flow Control + + </a> + + + + </li> + + <li class="chapter " data-level="1.23" data-path="send-guarantees.html"> + + <a href="send-guarantees.html"> + + + Guarantees of sends and commits + + </a> + + + + </li> + + <li class="chapter " data-level="1.24" data-path="undelivered-messages.html"> + + <a href="undelivered-messages.html"> + + + Message Redelivery and Undelivered Messages + + </a> + + + + </li> + + <li class="chapter " data-level="1.25" data-path="message-expiry.html"> + + <a href="message-expiry.html"> + + + Message Expiry + + </a> + + + + </li> + + <li class="chapter " data-level="1.26" data-path="large-messages.html"> + + <a href="large-messages.html"> + + + Large Messages + + </a> + + + + </li> + + <li class="chapter " data-level="1.27" data-path="paging.html"> + + <a href="paging.html"> + + + Paging + + </a> + + + + </li> + + <li class="chapter " data-level="1.28" data-path="queue-attributes.html"> + + <a href="queue-attributes.html"> + + + Queue Attributes + + </a> + + + + </li> + + <li class="chapter " data-level="1.29" data-path="scheduled-messages.html"> + + <a href="scheduled-messages.html"> + + + Scheduled Messages + + </a> + + + + </li> + + <li class="chapter " data-level="1.30" data-path="last-value-queues.html"> + + <a href="last-value-queues.html"> + + + Last-Value Queues + + </a> + + + + </li> + + <li class="chapter " data-level="1.31" data-path="message-grouping.html"> + + <a href="message-grouping.html"> + + + Message Grouping + + </a> + + + + </li> + + <li class="chapter " data-level="1.32" data-path="pre-acknowledge.html"> + + <a href="pre-acknowledge.html"> + + + Extra Acknowledge Modes + + </a> + + + + </li> + + <li class="chapter " data-level="1.33" data-path="management.html"> + + <a href="management.html"> + + + Management + + </a> + + + + </li> + + <li class="chapter " data-level="1.34" data-path="security.html"> + + <a href="security.html"> + + + Security + + </a> + + + + </li> + + <li class="chapter " data-level="1.35" data-path="resource-limits.html"> + + <a href="resource-limits.html"> + + + Resource Limits + + </a> + + + + </li> + + <li class="chapter " data-level="1.36" data-path="jms-bridge.html"> + + <a href="jms-bridge.html"> + + + The JMS Bridge + + </a> + + + + </li> + + <li class="chapter " data-level="1.37" data-path="client-reconnection.html"> + + <a href="client-reconnection.html"> + + + Client Reconnection and Session Reattachment + + </a> + + + + </li> + + <li class="chapter " data-level="1.38" data-path="diverts.html"> + + <a href="diverts.html"> + + + Diverting and Splitting Message Flows + + </a> + + + + </li> + + <li class="chapter " data-level="1.39" data-path="core-bridges.html"> + + <a href="core-bridges.html"> + + + Core Bridges + + </a> + + + + </li> + + <li class="chapter " data-level="1.40" data-path="duplicate-detection.html"> + + <a href="duplicate-detection.html"> + + + Duplicate Message Detection + + </a> + + + + </li> + + <li class="chapter " data-level="1.41" data-path="clusters.html"> + + <a href="clusters.html"> + + + Clusters + + </a> + + + + </li> + + <li class="chapter " data-level="1.42" data-path="ha.html"> + + <a href="ha.html"> + + + High Availability and Failover + + </a> + + + + </li> + + <li class="chapter " data-level="1.43" data-path="graceful-shutdown.html"> + + <a href="graceful-shutdown.html"> + + + Graceful Server Shutdown + + </a> + + + + </li> + + <li class="chapter " data-level="1.44" data-path="libaio.html"> + + <a href="libaio.html"> + + + Libaio Native Libraries + + </a> + + + + </li> + + <li class="chapter " data-level="1.45" data-path="thread-pooling.html"> + + <a href="thread-pooling.html"> + + + Thread management + + </a> + + + + </li> + + <li class="chapter " data-level="1.46" data-path="logging.html"> + + <a href="logging.html"> + + + Logging + + </a> + + + + </li> + + <li class="chapter " data-level="1.47" data-path="rest.html"> + + <a href="rest.html"> + + + REST Interface + + </a> + + + + </li> + + <li class="chapter " data-level="1.48" data-path="embedding-activemq.html"> + + <a href="embedding-activemq.html"> + + + Embedding Apache ActiveMQ Artemis + + </a> + + + + </li> + + <li class="chapter active" data-level="1.49" data-path="karaf.html"> + + <a href="karaf.html"> + + + Apache Karaf + + </a> + + + + </li> + + <li class="chapter " data-level="1.50" data-path="spring-integration.html"> + + <a href="spring-integration.html"> + + + Spring Integration + + </a> + + + + </li> + + <li class="chapter " data-level="1.51" data-path="aerogear-integration.html"> + + <a href="aerogear-integration.html"> + + + AeroGear Integration + + </a> + + + + </li> + + <li class="chapter " data-level="1.52" data-path="vertx-integration.html"> + + <a href="vertx-integration.html"> + + + VertX Integration + + </a> + + + + </li> + + <li class="chapter " data-level="1.53" data-path="cdi-integration.html"> + + <a href="cdi-integration.html"> + + + CDI Integration + + </a> + + + + </li> + + <li class="chapter " data-level="1.54" data-path="intercepting-operations.html"> + + <a href="intercepting-operations.html"> + + + Intercepting Operations + + </a> + + + + </li> + + <li class="chapter " data-level="1.55" data-path="protocols-interoperability.html"> + + <a href="protocols-interoperability.html"> + + + Protocols and Interoperability + + </a> + + + + </li> + + <li class="chapter " data-level="1.56" data-path="tools.html"> + + <a href="tools.html"> + + + Tools + + </a> + + + + </li> + + <li class="chapter " data-level="1.57" data-path="maven-plugin.html"> + + <a href="maven-plugin.html"> + + + Maven Plugin + + </a> + + + + </li> + + <li class="chapter " data-level="1.58" data-path="unit-testing.html"> + + <a href="unit-testing.html"> + + + Unit Testing + + </a> + + + + </li> + + <li class="chapter " data-level="1.59" data-path="perf-tuning.html"> + + <a href="perf-tuning.html"> + + + Troubleshooting and Performance Tuning + + </a> + + + + </li> + + <li class="chapter " data-level="1.60" data-path="configuration-index.html"> + + <a href="configuration-index.html"> + + + Configuration Reference + + </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="." >Apache Karaf</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="artemis-on-apache-karaf">Artemis on Apache Karaf</h1> +<p>Apache ActiveMQ Artemis is OSGi ready. Below you can find instruction on how to install and configure broker on Apache Karaf OSGi container.</p> +<h2 id="installation">Installation</h2> +<p>Apache ActiveMQ Artemis provides features that makes it easy to install the broker on Apache Karaf (4.x or later). First you need to define the feature URL, like </p> +<pre><code class="lang-sh">karaf@root()> feature:repo-add mvn:org.apache.activemq/artemis-features/1.3.0-SNAPSHOT/xml/features +</code></pre> +<p>This will add Artemis related features </p> +<pre><code>karaf@root()> feature:list | grep artemis +artemis | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | Full ActiveMQ Artemis broker with default configuration +netty-core | 4.0.32.Final | | Uninstalled | artemis-1.3.0-SNAPSHOT | Netty libraries +artemis-core | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis broker libraries +artemis-amqp | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis AMQP protocol libraries +artemis-stomp | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis Stomp protocol libraries +artemis-mqtt | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis MQTT protocol libraries +artemis-hornetq | 1.3.0.SNAPSHOT | | Uninstalled | artemis-1.3.0-SNAPSHOT | ActiveMQ Artemis HornetQ protocol libraries +</code></pre><p>Feature named <code>artemis</code> contains full broker installation, so running </p> +<pre><code>feature:install artemis +</code></pre><p>will install and run the broker.</p> +<h2 id="configuration">Configuration</h2> +<p>The broker is installed as <code>org.apache.activemq.artemis</code> OSGi component, so it's configured through <code>${KARAF_BASE}/etc/org.apache.activemq.artemis.cfg</code> file. An example of the file looks like</p> +<pre><code>config=file:etc/artemis.xml +name=local +domain=karaf +rolePrincipalClass=org.apache.karaf.jaas.boot.principal.RolePrincipal +</code></pre><table> +<thead> +<tr> +<th>Name</th> +<th>Description</th> +<th>Default value</th> +</tr> +</thead> +<tbody> +<tr> +<td>config</td> +<td>Location of the configuration file</td> +<td>${KARAF_BASE}/etc/artemis.xml</td> +</tr> +<tr> +<td>name</td> +<td>Name of the broker</td> +<td>local</td> +</tr> +<tr> +<td>domain</td> +<td>JAAS domain to use for security</td> +<td>karaf</td> +</tr> +<tr> +<td>rolePrincipalClass</td> +<td>Class name used for role authorization purposes</td> +<td>org.apache.karaf.jaas.boot.principal.RolePrincipal</td> +</tr> +</tbody> +</table> +<p>The default broker configuration file is located in <code>${KARAF_BASE}/etc/artemis.xml</code> </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="embedding-activemq.html" class="navigation navigation-prev " aria-label="Previous page: Embedding Apache ActiveMQ Artemis"> + <i class="fa fa-angle-left"></i> + </a> + + + <a href="spring-integration.html" class="navigation navigation-next " aria-label="Next page: Spring Integration"> + <i class="fa fa-angle-right"></i> + </a> + + + + </div> + + <script> + var gitbook = gitbook || []; + gitbook.push(function() { + gitbook.page.hasChanged({"page":{"title":"Apache Karaf","level":"1.49","depth":1,"next":{"title":"Spring Integration","level":"1.50","depth":1,"path":"spring-integration.md","ref":"spring-integration.md","articles":[]},"previous":{"title":"Embedding Apache ActiveMQ Artemis","level":"1.48","depth":1,"path":"embedding-activemq.md","ref":"embedding-activemq.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","mo bi":"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/","issues":"http://activemq.apache.org/","contribute":"http://activemq.apache.org/contributing.html"},"gitbook":"3.x.x","description":"ActiveMQ Artemis User Guide and Reference Documentation"},"file":{"path":"karaf.md","mtime":"2016-10-22T12:23:36.000Z","type":"markdown"},"gitbook":{"version":"3.1.1","time":"2016-11-12T01:00:04.718Z"},"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/1.5.4/large-messages.html ============================================================================== --- websites/production/activemq/content/artemis/docs/1.5.4/large-messages.html (added) +++ websites/production/activemq/content/artemis/docs/1.5.4/large-messages.html Sun Mar 12 16:08:18 2017 @@ -0,0 +1,1229 @@ + +<!DOCTYPE HTML> +<html lang="" > + <head> + <title>Large Messages · 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="paging.html" /> + + + <link rel="prev" href="message-expiry.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="using-jms.html"> + + <a href="using-jms.html"> + + + Using JMS + + </a> + + + + </li> + + <li class="chapter " data-level="1.9" data-path="using-core.html"> + + <a href="using-core.html"> + + + Using Core + + </a> + + + + </li> + + <li class="chapter " data-level="1.10" 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.11" data-path="client-classpath.html"> + + <a href="client-classpath.html"> + + + The Client Classpath + + </a> + + + + </li> + + <li class="chapter " data-level="1.12" data-path="examples.html"> + + <a href="examples.html"> + + + Examples + + </a> + + + + </li> + + <li class="chapter " data-level="1.13" data-path="wildcard-routing.html"> + + <a href="wildcard-routing.html"> + + + Routing Messages With Wild Cards + + </a> + + + + </li> + + <li class="chapter " data-level="1.14" 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.15" data-path="filter-expressions.html"> + + <a href="filter-expressions.html"> + + + Filter Expressions + + </a> + + + + </li> + + <li class="chapter " data-level="1.16" data-path="persistence.html"> + + <a href="persistence.html"> + + + Persistence + + </a> + + + + </li> + + <li class="chapter " data-level="1.17" data-path="configuring-transports.html"> + + <a href="configuring-transports.html"> + + + Configuring Transports + + </a> + + + + </li> + + <li class="chapter " data-level="1.18" data-path="config-reload.html"> + + <a href="config-reload.html"> + + + Configuration Reload + + </a> + + + + </li> + + <li class="chapter " data-level="1.19" data-path="connection-ttl.html"> + + <a href="connection-ttl.html"> + + + Detecting Dead Connections + + </a> + + + + </li> + + <li class="chapter " data-level="1.20" data-path="slow-consumers.html"> + + <a href="slow-consumers.html"> + + + Detecting Slow Consumers + + </a> + + + + </li> + + <li class="chapter " data-level="1.21" data-path="transaction-config.html"> + + <a href="transaction-config.html"> + + + Resource Manager Configuration + + </a> + + + + </li> + + <li class="chapter " data-level="1.22" data-path="flow-control.html"> + + <a href="flow-control.html"> + + + Flow Control + + </a> + + + + </li> + + <li class="chapter " data-level="1.23" data-path="send-guarantees.html"> + + <a href="send-guarantees.html"> + + + Guarantees of sends and commits + + </a> + + + + </li> + + <li class="chapter " data-level="1.24" data-path="undelivered-messages.html"> + + <a href="undelivered-messages.html"> + + + Message Redelivery and Undelivered Messages + + </a> + + + + </li> + + <li class="chapter " data-level="1.25" data-path="message-expiry.html"> + + <a href="message-expiry.html"> + + + Message Expiry + + </a> + + + + </li> + + <li class="chapter active" data-level="1.26" data-path="large-messages.html"> + + <a href="large-messages.html"> + + + Large Messages + + </a> + + + + </li> + + <li class="chapter " data-level="1.27" data-path="paging.html"> + + <a href="paging.html"> + + + Paging + + </a> + + + + </li> + + <li class="chapter " data-level="1.28" data-path="queue-attributes.html"> + + <a href="queue-attributes.html"> + + + Queue Attributes + + </a> + + + + </li> + + <li class="chapter " data-level="1.29" data-path="scheduled-messages.html"> + + <a href="scheduled-messages.html"> + + + Scheduled Messages + + </a> + + + + </li> + + <li class="chapter " data-level="1.30" data-path="last-value-queues.html"> + + <a href="last-value-queues.html"> + + + Last-Value Queues + + </a> + + + + </li> + + <li class="chapter " data-level="1.31" data-path="message-grouping.html"> + + <a href="message-grouping.html"> + + + Message Grouping + + </a> + + + + </li> + + <li class="chapter " data-level="1.32" data-path="pre-acknowledge.html"> + + <a href="pre-acknowledge.html"> + + + Extra Acknowledge Modes + + </a> + + + + </li> + + <li class="chapter " data-level="1.33" data-path="management.html"> + + <a href="management.html"> + + + Management + + </a> + + + + </li> + + <li class="chapter " data-level="1.34" data-path="security.html"> + + <a href="security.html"> + + + Security + + </a> + + + + </li> + + <li class="chapter " data-level="1.35" data-path="resource-limits.html"> + + <a href="resource-limits.html"> + + + Resource Limits + + </a> + + + + </li> + + <li class="chapter " data-level="1.36" data-path="jms-bridge.html"> + + <a href="jms-bridge.html"> + + + The JMS Bridge + + </a> + + + + </li> + + <li class="chapter " data-level="1.37" data-path="client-reconnection.html"> + + <a href="client-reconnection.html"> + + + Client Reconnection and Session Reattachment + + </a> + + + + </li> + + <li class="chapter " data-level="1.38" data-path="diverts.html"> + + <a href="diverts.html"> + + + Diverting and Splitting Message Flows + + </a> + + + + </li> + + <li class="chapter " data-level="1.39" data-path="core-bridges.html"> + + <a href="core-bridges.html"> + + + Core Bridges + + </a> + + + + </li> + + <li class="chapter " data-level="1.40" data-path="duplicate-detection.html"> + + <a href="duplicate-detection.html"> + + + Duplicate Message Detection + + </a> + + + + </li> + + <li class="chapter " data-level="1.41" data-path="clusters.html"> + + <a href="clusters.html"> + + + Clusters + + </a> + + + + </li> + + <li class="chapter " data-level="1.42" data-path="ha.html"> + + <a href="ha.html"> + + + High Availability and Failover + + </a> + + + + </li> + + <li class="chapter " data-level="1.43" data-path="graceful-shutdown.html"> + + <a href="graceful-shutdown.html"> + + + Graceful Server Shutdown + + </a> + + + + </li> + + <li class="chapter " data-level="1.44" data-path="libaio.html"> + + <a href="libaio.html"> + + + Libaio Native Libraries + + </a> + + + + </li> + + <li class="chapter " data-level="1.45" data-path="thread-pooling.html"> + + <a href="thread-pooling.html"> + + + Thread management + + </a> + + + + </li> + + <li class="chapter " data-level="1.46" data-path="logging.html"> + + <a href="logging.html"> + + + Logging + + </a> + + + + </li> + + <li class="chapter " data-level="1.47" data-path="rest.html"> + + <a href="rest.html"> + + + REST Interface + + </a> + + + + </li> + + <li class="chapter " data-level="1.48" data-path="embedding-activemq.html"> + + <a href="embedding-activemq.html"> + + + Embedding Apache ActiveMQ Artemis + + </a> + + + + </li> + + <li class="chapter " data-level="1.49" data-path="karaf.html"> + + <a href="karaf.html"> + + + Apache Karaf + + </a> + + + + </li> + + <li class="chapter " data-level="1.50" data-path="spring-integration.html"> + + <a href="spring-integration.html"> + + + Spring Integration + + </a> + + + + </li> + + <li class="chapter " data-level="1.51" data-path="aerogear-integration.html"> + + <a href="aerogear-integration.html"> + + + AeroGear Integration + + </a> + + + + </li> + + <li class="chapter " data-level="1.52" data-path="vertx-integration.html"> + + <a href="vertx-integration.html"> + + + VertX Integration + + </a> + + + + </li> + + <li class="chapter " data-level="1.53" data-path="cdi-integration.html"> + + <a href="cdi-integration.html"> + + + CDI Integration + + </a> + + + + </li> + + <li class="chapter " data-level="1.54" data-path="intercepting-operations.html"> + + <a href="intercepting-operations.html"> + + + Intercepting Operations + + </a> + + + + </li> + + <li class="chapter " data-level="1.55" data-path="protocols-interoperability.html"> + + <a href="protocols-interoperability.html"> + + + Protocols and Interoperability + + </a> + + + + </li> + + <li class="chapter " data-level="1.56" data-path="tools.html"> + + <a href="tools.html"> + + + Tools + + </a> + + + + </li> + + <li class="chapter " data-level="1.57" data-path="maven-plugin.html"> + + <a href="maven-plugin.html"> + + + Maven Plugin + + </a> + + + + </li> + + <li class="chapter " data-level="1.58" data-path="unit-testing.html"> + + <a href="unit-testing.html"> + + + Unit Testing + + </a> + + + + </li> + + <li class="chapter " data-level="1.59" data-path="perf-tuning.html"> + + <a href="perf-tuning.html"> + + + Troubleshooting and Performance Tuning + + </a> + + + + </li> + + <li class="chapter " data-level="1.60" data-path="configuration-index.html"> + + <a href="configuration-index.html"> + + + Configuration Reference + + </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="." >Large Messages</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="large-messages">Large Messages</h1> +<p>Apache ActiveMQ Artemis supports sending and receiving of huge messages, even when the +client and server are running with limited memory. The only realistic +limit to the size of a message that can be sent or consumed is the +amount of disk space you have available. We have tested sending and +consuming messages up to 8 GiB in size with a client and server running +in just 50MiB of RAM!</p> +<p>To send a large message, the user can set an <code>InputStream</code> on a message +body, and when that message is sent, Apache ActiveMQ Artemis will read the +<code>InputStream</code>. A <code>FileInputStream</code> could be used for example to send a +huge message from a huge file on disk.</p> +<p>As the <code>InputStream</code> is read the data is sent to the server as a stream +of fragments. The server persists these fragments to disk as it receives +them and when the time comes to deliver them to a consumer they are read +back of the disk, also in fragments and sent down the wire. When the +consumer receives a large message it initially receives just the message +with an empty body, it can then set an <code>OutputStream</code> on the message to +stream the huge message body to a file on disk or elsewhere. At no time +is the entire message body stored fully in memory, either on the client +or the server.</p> +<h2 id="configuring-the-server">Configuring the server</h2> +<p>Large messages are stored on a disk directory on the server side, as +configured on the main configuration file.</p> +<p>The configuration property <code>large-messages-directory</code> specifies where +large messages are stored.</p> +<pre><code><configuration xmlns="urn:activemq" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd"> +... +<large-messages-directory>/data/large-messages</large-messages-directory> +... +</configuration +</code></pre><p>By default the large message directory is <code>data/largemessages</code></p> +<p>For the best performance we recommend large messages directory is stored +on a different physical volume to the message journal or paging +directory.</p> +<h2 id="configuring-parameters">Configuring Parameters</h2> +<p>Any message larger than a certain size is considered a large message. +Large messages will be split up and sent in fragments. This is +determined by the parameter <code>minLargeMessageSize</code></p> +<blockquote> +<p><strong>Note</strong></p> +<p>Apache ActiveMQ Artemis messages are encoded using 2 bytes per character so if the +message data is filled with ASCII characters (which are 1 byte) the +size of the resulting Apache ActiveMQ Artemis message would roughly double. This is +important when calculating the size of a "large" message as it may +appear to be less than the <code>minLargeMessageSize</code> before it is sent, +but it then turns into a "large" message once it is encoded.</p> +</blockquote> +<p>The default value is 100KiB.</p> +<h3 id="using-core-api">Using Core API</h3> +<p>If the Apache ActiveMQ Artemis Core API is used, the minimal large message size is +specified by <code>ServerLocator.setMinLargeMessageSize</code>.</p> +<pre><code class="lang-java">ServerLocator locator = ActiveMQClient.createServerLocatorWithoutHA(<span class="hljs-keyword">new</span> TransportConfiguration(NettyConnectorFactory.class.getName())) + +locator.setMinLargeMessageSize(<span class="hljs-number">25</span> * <span class="hljs-number">1024</span>); + +ClientSessionFactory factory = ActiveMQClient.createClientSessionFactory(); +</code></pre> +<p><a href="configuring-transports.html">Configuring the transport directly from the client side</a> will provide more information on how to instantiate the session +factory.</p> +<h3 id="using-jms">Using JMS</h3> +<p>If JNDI is used to instantiate and look up the connection factory, the +minimum large message size is configured in the JNDI context +environment, e.g. <code>jndi.properties</code>. Here's a simple example using the +"ConnectionFactory" connection factory which is available in the context +by default:</p> +<pre><code>java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory +connectionFactory.myConnectionFactory=tcp://localhost:61616?minLargeMessageSize=250000 +</code></pre><p>If the connection factory is being instantiated directly, the minimum +large message size is specified by +<code>ActiveMQConnectionFactory.setMinLargeMessageSize</code>.</p> +<h3 id="compressed-large-messages">Compressed Large Messages</h3> +<p>You can choose to send large messages in compressed form using <code>compress-large-messages</code> attributes.</p> +<h4 id="compresslargemessages"><code>compressLargeMessages</code></h4> +<p>If you specify the boolean property <code>compressLargeMessages</code> on the +<code>server locator</code> or <code>ConnectionFactory</code> as true, The system will use the +ZIP algorithm to compress the message body as the message is transferred +to the server's side. Notice that there's no special treatment at the +server's side, all the compressing and uncompressing is done at the +client.</p> +<p>If the compressed size of a large message is below <code>minLargeMessageSize</code>, it is sent to server as regular +messages. This means that the message won't be written into the server's +large-message data directory, thus reducing the disk I/O.</p> +<h2 id="">#</h2> +<p>If JNDI is used to instantiate and look up the connection factory, large +message compression can be configured in the JNDI context environment, +e.g. <code>jndi.properties</code>. Here's a simple example using the +"ConnectionFactory" connection factory which is available in the context +by default:</p> +<pre><code>java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory +connectionFactory.myConnectionFactory=tcp://localhost:61616?compressLargeMessages=true +</code></pre><h2 id="streaming-large-messages">Streaming large messages</h2> +<p>Apache ActiveMQ Artemis supports setting the body of messages using input and output +streams (<code>java.lang.io</code>)</p> +<p>These streams are then used directly for sending (input streams) and +receiving (output streams) messages.</p> +<p>When receiving messages there are 2 ways to deal with the output stream; +you may choose to block while the output stream is recovered using the +method <code>ClientMessage.saveOutputStream</code> or alternatively using the +method <code>ClientMessage.setOutputstream</code> which will asynchronously write +the message to the stream. If you choose the latter the consumer must be +kept alive until the message has been fully received.</p> +<p>You can use any kind of stream you like. The most common use case is to +send files stored in your disk, but you could also send things like JDBC +Blobs, <code>SocketInputStream</code>, things you recovered from <code>HTTPRequests</code> +etc. Anything as long as it implements <code>java.io.InputStream</code> for sending +messages or <code>java.io.OutputStream</code> for receiving them.</p> +<h3 id="streaming-over-core-api">Streaming over Core API</h3> +<p>The following table shows a list of methods available at <code>ClientMessage</code> +which are also available through JMS by the use of object properties.</p> +<table summary="Server Configuration" border="1"> + <colgroup> + <col> + <col> + <col> + <col> + </colgroup> + <thead> + <tr> + <th>Name</th> + <th>Description</th> + <th>JMS Equivalent</th> + </tr> + </thead> + <tbody> + <tr> + <td>setBodyInputStream(InputStream)</td> + <td>Set the InputStream used to read a message body when sending it.</td> + <td>JMS_AMQ_InputStream</td> + </tr> + <tr> + <td>setOutputStream(OutputStream)</td> + <td>Set the OutputStream that will receive the body of a message. This method does not block.</td> + <td>JMS_AMQ_OutputStream</td> + </tr> + <tr> + <td>saveOutputStream(OutputStream)</td> + <td>Save the body of the message to the `OutputStream`. It will block until the entire content is transferred to the `OutputStream`.</td> + <td>JMS_AMQ_SaveStream</td> + </tr> + </tbody> +</table> + +<p> : org.apache.activemq.artemis.api.core.client.ClientMessage API</p> +<p>To set the output stream when receiving a core message:</p> +<pre><code class="lang-java">ClientMessage msg = consumer.receive(...); + + +<span class="hljs-comment">// This will block here until the stream was transferred</span> +msg.saveOutputStream(someOutputStream); + +ClientMessage msg2 = consumer.receive(...); + +<span class="hljs-comment">// This will not wait the transfer to finish</span> +msg.setOutputStream(someOtherOutputStream); +</code></pre> +<p>Set the input stream when sending a core message:</p> +<pre><code class="lang-java">ClientMessage msg = session.createMessage(); +msg.setInputStream(dataInputStream); +</code></pre> +<p>Notice also that for messages with more than 2GiB the getBodySize() will +return invalid values since this is an integer (which is also exposed to +the JMS API). On those cases you can use the message property +_AMQ_LARGE_SIZE.</p> +<h3 id="streaming-over-jms">Streaming over JMS</h3> +<p>When using JMS, Apache ActiveMQ Artemis maps the streaming methods on the core API (see +ClientMessage API table above) by setting object properties . You can use the method +<code>Message.setObjectProperty</code> to set the input and output streams.</p> +<p>The <code>InputStream</code> can be defined through the JMS Object Property +JMS_AMQ_InputStream on messages being sent:</p> +<pre><code class="lang-java">BytesMessage message = session.createBytesMessage(); + +FileInputStream fileInputStream = <span class="hljs-keyword">new</span> FileInputStream(fileInput); + +BufferedInputStream bufferedInput = <span class="hljs-keyword">new</span> BufferedInputStream(fileInputStream); + +message.setObjectProperty(<span class="hljs-string">"JMS_AMQ_InputStream"</span>, bufferedInput); + +someProducer.send(message); +</code></pre> +<p>The <code>OutputStream</code> can be set through the JMS Object Property +JMS_AMQ_SaveStream on messages being received in a blocking way.</p> +<pre><code class="lang-java">BytesMessage messageReceived = (BytesMessage)messageConsumer.receive(<span class="hljs-number">120000</span>); + +File outputFile = <span class="hljs-keyword">new</span> File(<span class="hljs-string">"huge_message_received.dat"</span>); + +FileOutputStream fileOutputStream = <span class="hljs-keyword">new</span> FileOutputStream(outputFile); + +BufferedOutputStream bufferedOutput = <span class="hljs-keyword">new</span> BufferedOutputStream(fileOutputStream); + +<span class="hljs-comment">// This will block until the entire content is saved on disk</span> +messageReceived.setObjectProperty(<span class="hljs-string">"JMS_AMQ_SaveStream"</span>, bufferedOutput); +</code></pre> +<p>Setting the <code>OutputStream</code> could also be done in a non blocking way +using the property JMS_AMQ_OutputStream.</p> +<pre><code class="lang-java"><span class="hljs-comment">// This won't wait the stream to finish. You need to keep the consumer active.</span> +messageReceived.setObjectProperty(<span class="hljs-string">"JMS_AMQ_OutputStream"</span>, bufferedOutput); +</code></pre> +<blockquote> +<p><strong>Note</strong></p> +<p>When using JMS, Streaming large messages are only supported on +<code>StreamMessage</code> and <code>BytesMessage</code>.</p> +</blockquote> +<h2 id="streaming-alternative">Streaming Alternative</h2> +<p>If you choose not to use the <code>InputStream</code> or <code>OutputStream</code> capability +of Apache ActiveMQ Artemis You could still access the data directly in an alternative +fashion.</p> +<p>On the Core API just get the bytes of the body as you normally would.</p> +<pre><code class="lang-java">ClientMessage msg = consumer.receive(); + +<span class="hljs-keyword">byte</span>[] bytes = <span class="hljs-keyword">new</span> <span class="hljs-keyword">byte</span>[<span class="hljs-number">1024</span>]; +<span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> i = <span class="hljs-number">0</span> ; i < msg.getBodySize(); i += bytes.length) +{ + msg.getBody().readBytes(bytes); + <span class="hljs-comment">// Whatever you want to do with the bytes</span> +} +</code></pre> +<p>If using JMS API, <code>BytesMessage</code> and <code>StreamMessage</code> also supports it +transparently.</p> +<pre><code class="lang-java">BytesMessage rm = (BytesMessage)cons.receive(<span class="hljs-number">10000</span>); + +<span class="hljs-keyword">byte</span> data[] = <span class="hljs-keyword">new</span> <span class="hljs-keyword">byte</span>[<span class="hljs-number">1024</span>]; + +<span class="hljs-keyword">for</span> (<span class="hljs-keyword">int</span> i = <span class="hljs-number">0</span>; i < rm.getBodyLength(); i += <span class="hljs-number">1024</span>) +{ + <span class="hljs-keyword">int</span> numberOfBytes = rm.readBytes(data); + <span class="hljs-comment">// Do whatever you want with the data</span> +} +</code></pre> +<h2 id="large-message-example">Large message example</h2> +<p>Please see the <a href="examples.html">examples</a> chapter for an example which shows how large message is configured +and used 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-expiry.html" class="navigation navigation-prev " aria-label="Previous page: Message Expiry"> + <i class="fa fa-angle-left"></i> + </a> + + + <a href="paging.html" class="navigation navigation-next " aria-label="Next page: Paging"> + <i class="fa fa-angle-right"></i> + </a> + + + + </div> + + <script> + var gitbook = gitbook || []; + gitbook.push(function() { + gitbook.page.hasChanged({"page":{"title":"Large Messages","level":"1.26","depth":1,"next":{"title":"Paging","level":"1.27","depth":1,"path":"paging.md","ref":"paging.md","articles":[]},"previous":{"title":"Message Expiry","level":"1.25","depth":1,"path":"message-expiry.md","ref":"message-expiry.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":"sty les/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/","issues":"http://activemq.apache.org/","contribute":"http://activemq.apache.org/contributing.html"},"gitbook":"3.x.x","description":"ActiveMQ Artemis User Guide and Reference Documentation"},"file":{"path":"large-messages.md","mtime":"2016-10-22T12:23:36.000Z","type":"markdown"},"gitbook":{"version":"3.1.1","time":"2016-11-12T01:00:04.718Z"},"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> +
