| |
| <!DOCTYPE HTML> |
| <html lang="" > |
| <head> |
| <meta charset="UTF-8"> |
| <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> |
| <title>Paging ยท ActiveMQ Artemis Documentation</title> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
| <meta name="description" content=""> |
| <meta name="generator" content="GitBook 3.2.3"> |
| |
| |
| |
| |
| <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="scheduled-messages.html" /> |
| |
| |
| <link rel="prev" href="large-messages.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="versions.html"> |
| |
| <a href="versions.html"> |
| |
| |
| Versions |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.6" data-path="messaging-concepts.html"> |
| |
| <a href="messaging-concepts.html"> |
| |
| |
| Messaging Concepts |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.7" data-path="architecture.html"> |
| |
| <a href="architecture.html"> |
| |
| |
| Architecture |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.8" data-path="using-server.html"> |
| |
| <a href="using-server.html"> |
| |
| |
| Using the Server |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.9" data-path="upgrading.html"> |
| |
| <a href="upgrading.html"> |
| |
| |
| Upgrading |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.10" > |
| |
| <span> |
| |
| |
| Address |
| |
| </span> |
| |
| |
| |
| <ul class="articles"> |
| |
| |
| <li class="chapter " data-level="1.10.1" data-path="address-model.html"> |
| |
| <a href="address-model.html"> |
| |
| |
| Model |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.10.2" data-path="address-settings.html"> |
| |
| <a href="address-settings.html"> |
| |
| |
| Settings |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| |
| </ul> |
| |
| </li> |
| |
| <li class="chapter " data-level="1.11" data-path="protocols-interoperability.html"> |
| |
| <a href="protocols-interoperability.html"> |
| |
| |
| Protocols and Interoperability |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.12" data-path="amqp.html"> |
| |
| <a href="amqp.html"> |
| |
| |
| AMQP |
| |
| </a> |
| |
| |
| |
| <ul class="articles"> |
| |
| |
| <li class="chapter " data-level="1.12.1" data-path="amqp-broker-connections.html"> |
| |
| <a href="amqp-broker-connections.html"> |
| |
| |
| Broker Connections |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| |
| </ul> |
| |
| </li> |
| |
| <li class="chapter " data-level="1.13" data-path="mqtt.html"> |
| |
| <a href="mqtt.html"> |
| |
| |
| MQTT |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.14" data-path="stomp.html"> |
| |
| <a href="stomp.html"> |
| |
| |
| STOMP |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.15" data-path="openwire.html"> |
| |
| <a href="openwire.html"> |
| |
| |
| OpenWire |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.16" data-path="core.html"> |
| |
| <a href="core.html"> |
| |
| |
| Core |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.17" 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.18" data-path="using-jms.html"> |
| |
| <a href="using-jms.html"> |
| |
| |
| Using JMS |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.19" data-path="client-classpath.html"> |
| |
| <a href="client-classpath.html"> |
| |
| |
| The Client Classpath |
| |
| </a> |
| |
| |
| |
| <ul class="articles"> |
| |
| |
| <li class="chapter " data-level="1.19.1" data-path="client-classpath-jms.html"> |
| |
| <a href="client-classpath-jms.html"> |
| |
| |
| JMS |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.19.2" data-path="client-classpath-jakarta.html"> |
| |
| <a href="client-classpath-jakarta.html"> |
| |
| |
| Jakarta |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| |
| </ul> |
| |
| </li> |
| |
| <li class="chapter " data-level="1.20" data-path="examples.html"> |
| |
| <a href="examples.html"> |
| |
| |
| Examples |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.21" data-path="wildcard-routing.html"> |
| |
| <a href="wildcard-routing.html"> |
| |
| |
| Routing Messages With Wild Cards |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.22" data-path="wildcard-syntax.html"> |
| |
| <a href="wildcard-syntax.html"> |
| |
| |
| Wildcard Syntax |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.23" data-path="filter-expressions.html"> |
| |
| <a href="filter-expressions.html"> |
| |
| |
| Filter Expressions |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.24" data-path="persistence.html"> |
| |
| <a href="persistence.html"> |
| |
| |
| Persistence |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.25" data-path="configuring-transports.html"> |
| |
| <a href="configuring-transports.html"> |
| |
| |
| Configuring Transports |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.26" data-path="config-reload.html"> |
| |
| <a href="config-reload.html"> |
| |
| |
| Configuration Reload |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.27" data-path="connection-ttl.html"> |
| |
| <a href="connection-ttl.html"> |
| |
| |
| Detecting Dead Connections |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.28" data-path="slow-consumers.html"> |
| |
| <a href="slow-consumers.html"> |
| |
| |
| Detecting Slow Consumers |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.29" data-path="network-isolation.html"> |
| |
| <a href="network-isolation.html"> |
| |
| |
| Avoiding Network Isolation |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.30" data-path="critical-analysis.html"> |
| |
| <a href="critical-analysis.html"> |
| |
| |
| Detecting Broker Issues (Critical Analysis) |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.31" data-path="transaction-config.html"> |
| |
| <a href="transaction-config.html"> |
| |
| |
| Resource Manager Configuration |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.32" data-path="flow-control.html"> |
| |
| <a href="flow-control.html"> |
| |
| |
| Flow Control |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.33" data-path="send-guarantees.html"> |
| |
| <a href="send-guarantees.html"> |
| |
| |
| Guarantees of sends and commits |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.34" data-path="undelivered-messages.html"> |
| |
| <a href="undelivered-messages.html"> |
| |
| |
| Message Redelivery and Undelivered Messages |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.35" data-path="message-expiry.html"> |
| |
| <a href="message-expiry.html"> |
| |
| |
| Message Expiry |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.36" data-path="large-messages.html"> |
| |
| <a href="large-messages.html"> |
| |
| |
| Large Messages |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter active" data-level="1.37" data-path="paging.html"> |
| |
| <a href="paging.html"> |
| |
| |
| Paging |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.38" data-path="scheduled-messages.html"> |
| |
| <a href="scheduled-messages.html"> |
| |
| |
| Scheduled Messages |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.39" data-path="last-value-queues.html"> |
| |
| <a href="last-value-queues.html"> |
| |
| |
| Last-Value Queues |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.40" data-path="non-destructive-queues.html"> |
| |
| <a href="non-destructive-queues.html"> |
| |
| |
| Non-Destructive Queues |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.41" data-path="ring-queues.html"> |
| |
| <a href="ring-queues.html"> |
| |
| |
| Ring Queues |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.42" data-path="retroactive-addresses.html"> |
| |
| <a href="retroactive-addresses.html"> |
| |
| |
| Retroactive Addresses |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.43" data-path="exclusive-queues.html"> |
| |
| <a href="exclusive-queues.html"> |
| |
| |
| Exclusive Queues |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.44" data-path="message-grouping.html"> |
| |
| <a href="message-grouping.html"> |
| |
| |
| Message Grouping |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.45" data-path="consumer-priority.html"> |
| |
| <a href="consumer-priority.html"> |
| |
| |
| Consumer Priority |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.46" data-path="pre-acknowledge.html"> |
| |
| <a href="pre-acknowledge.html"> |
| |
| |
| Extra Acknowledge Modes |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.47" data-path="management.html"> |
| |
| <a href="management.html"> |
| |
| |
| Management |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.48" data-path="management-console.html"> |
| |
| <a href="management-console.html"> |
| |
| |
| Management Console |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.49" data-path="metrics.html"> |
| |
| <a href="metrics.html"> |
| |
| |
| Metrics |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.50" data-path="security.html"> |
| |
| <a href="security.html"> |
| |
| |
| Security |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.51" data-path="masking-passwords.html"> |
| |
| <a href="masking-passwords.html"> |
| |
| |
| Masking Passwords |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.52" data-path="broker-plugins.html"> |
| |
| <a href="broker-plugins.html"> |
| |
| |
| Broker Plugins |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.53" data-path="resource-limits.html"> |
| |
| <a href="resource-limits.html"> |
| |
| |
| Resource Limits |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.54" data-path="jms-bridge.html"> |
| |
| <a href="jms-bridge.html"> |
| |
| |
| The JMS Bridge |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.55" data-path="client-reconnection.html"> |
| |
| <a href="client-reconnection.html"> |
| |
| |
| Client Reconnection and Session Reattachment |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.56" data-path="diverts.html"> |
| |
| <a href="diverts.html"> |
| |
| |
| Diverting and Splitting Message Flows |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.57" data-path="core-bridges.html"> |
| |
| <a href="core-bridges.html"> |
| |
| |
| Core Bridges |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.58" data-path="transformers.html"> |
| |
| <a href="transformers.html"> |
| |
| |
| Transformers |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.59" data-path="duplicate-detection.html"> |
| |
| <a href="duplicate-detection.html"> |
| |
| |
| Duplicate Message Detection |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.60" data-path="clusters.html"> |
| |
| <a href="clusters.html"> |
| |
| |
| Clusters |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.61" data-path="federation.html"> |
| |
| <a href="federation.html"> |
| |
| |
| Federation |
| |
| </a> |
| |
| |
| |
| <ul class="articles"> |
| |
| |
| <li class="chapter " data-level="1.61.1" data-path="federation-address.html"> |
| |
| <a href="federation-address.html"> |
| |
| |
| Address Federation |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.61.2" data-path="federation-queue.html"> |
| |
| <a href="federation-queue.html"> |
| |
| |
| Queue Federation |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| |
| </ul> |
| |
| </li> |
| |
| <li class="chapter " data-level="1.62" data-path="ha.html"> |
| |
| <a href="ha.html"> |
| |
| |
| High Availability and Failover |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.63" data-path="connection-routers.html"> |
| |
| <a href="connection-routers.html"> |
| |
| |
| Connection Routers |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.64" data-path="graceful-shutdown.html"> |
| |
| <a href="graceful-shutdown.html"> |
| |
| |
| Graceful Server Shutdown |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.65" data-path="libaio.html"> |
| |
| <a href="libaio.html"> |
| |
| |
| Libaio Native Libraries |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.66" data-path="thread-pooling.html"> |
| |
| <a href="thread-pooling.html"> |
| |
| |
| Thread management |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.67" data-path="web-server.html"> |
| |
| <a href="web-server.html"> |
| |
| |
| Embedded Web Server |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.68" data-path="logging.html"> |
| |
| <a href="logging.html"> |
| |
| |
| Logging |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.69" data-path="rest.html"> |
| |
| <a href="rest.html"> |
| |
| |
| REST Interface |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.70" data-path="embedding-activemq.html"> |
| |
| <a href="embedding-activemq.html"> |
| |
| |
| Embedding the Broker |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.71" data-path="karaf.html"> |
| |
| <a href="karaf.html"> |
| |
| |
| Apache Karaf |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.72" data-path="tomcat.html"> |
| |
| <a href="tomcat.html"> |
| |
| |
| Apache Tomcat |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.73" data-path="spring-integration.html"> |
| |
| <a href="spring-integration.html"> |
| |
| |
| Spring Integration |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.74" data-path="cdi-integration.html"> |
| |
| <a href="cdi-integration.html"> |
| |
| |
| CDI Integration |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.75" data-path="intercepting-operations.html"> |
| |
| <a href="intercepting-operations.html"> |
| |
| |
| Intercepting Operations |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.76" data-path="data-tools.html"> |
| |
| <a href="data-tools.html"> |
| |
| |
| Data Tools |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.77" data-path="activation-tools.html"> |
| |
| <a href="activation-tools.html"> |
| |
| |
| Activation Tools |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.78" data-path="maven-plugin.html"> |
| |
| <a href="maven-plugin.html"> |
| |
| |
| Maven Plugin |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.79" data-path="unit-testing.html"> |
| |
| <a href="unit-testing.html"> |
| |
| |
| Unit Testing |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.80" data-path="perf-tuning.html"> |
| |
| <a href="perf-tuning.html"> |
| |
| |
| Troubleshooting and Performance Tuning |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.81" data-path="perf-tools.html"> |
| |
| <a href="perf-tools.html"> |
| |
| |
| Performance Tools |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.82" data-path="configuration-index.html"> |
| |
| <a href="configuration-index.html"> |
| |
| |
| Configuration Reference |
| |
| </a> |
| |
| |
| |
| </li> |
| |
| <li class="chapter " data-level="1.83" data-path="restart-sequence.html"> |
| |
| <a href="restart-sequence.html"> |
| |
| |
| Restart Sequence |
| |
| </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="." >Paging</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="paging">Paging</h1> |
| <p>Apache ActiveMQ Artemis transparently supports huge queues containing millions |
| of messages while the server is running with limited memory.</p> |
| <p>In such a situation it's not possible to store all of the queues in memory at |
| any one time, so Apache ActiveMQ Artemis transparently <em>pages</em> messages into |
| and out of memory as they are needed, thus allowing massive queues with a low |
| memory footprint.</p> |
| <p>Apache ActiveMQ Artemis will start paging messages to disk, when the size of |
| all messages in memory for an address exceeds a configured maximum size.</p> |
| <p>The default configuration from Artemis has destinations with paging.</p> |
| <h2 id="page-files">Page Files</h2> |
| <p>Messages are stored per address on the file system. Each address has an |
| individual folder where messages are stored in multiple files (page files). |
| Each file will contain messages up to a max configured size |
| (<code>page-size-bytes</code>). The system will navigate the files as needed, and it |
| will remove the page file as soon as all the messages are acknowledged up to |
| that point.</p> |
| <p>Browsers will read through the page-cursor system.</p> |
| <p>Consumers with selectors will also navigate through the page-files and it will |
| ignore messages that don't match the criteria.</p> |
| <blockquote> |
| <p><em>Warning:</em></p> |
| <p>When you have a queue, and consumers filtering the queue with a very |
| restrictive selector you may get into a situation where you won't be able to |
| read more data from paging until you consume messages from the queue.</p> |
| <p>Example: in one consumer you make a selector as 'color="red"' but you only |
| have one color red 1 millions messages after blue, you won't be able to |
| consume red until you consume blue ones.</p> |
| <p>This is different to browsing as we will "browse" the entire queue looking |
| for messages and while we "depage" messages while feeding the queue.</p> |
| </blockquote> |
| <h3 id="configuration">Configuration</h3> |
| <p>You can configure the location of the paging folder in <code>broker.xml</code>.</p> |
| <ul> |
| <li><code>paging-directory</code> Where page files are stored. Apache ActiveMQ Artemis will |
| create one folder for each address being paged under this configured |
| location. Default is <code>data/paging</code>.</li> |
| </ul> |
| <h2 id="paging-mode">Paging Mode</h2> |
| <p>As soon as messages delivered to an address exceed the configured size, |
| that address alone goes into page mode. If max-size-bytes == 0 or max-size-messages == 0, an address |
| will always use paging to route messages.</p> |
| <blockquote> |
| <p><strong>Note:</strong></p> |
| <p>Paging is done individually per address. If you configure a max-size-bytes or max-messages |
| for an address, that means each matching address will have a maximum size |
| that you specified. It DOES NOT mean that the total overall size of all |
| matching addresses is limited to max-size-bytes. Use <a href="#global-max-size">global-max-size</a> or <a href="#global-max-messages">global-max-messages</a> for that!</p> |
| </blockquote> |
| <h3 id="configuration">Configuration</h3> |
| <p>Configuration is done at the address settings in <code>broker.xml</code>.</p> |
| <pre><code class="lang-xml"><span class="hljs-tag"><<span class="hljs-name">address-settings</span>></span> |
| <span class="hljs-tag"><<span class="hljs-name">address-setting</span> <span class="hljs-attr">match</span>=<span class="hljs-string">"jms.someaddress"</span>></span> |
| <span class="hljs-tag"><<span class="hljs-name">max-size-bytes</span>></span>104857600<span class="hljs-tag"></<span class="hljs-name">max-size-bytes</span>></span> |
| <span class="hljs-tag"><<span class="hljs-name">max-size-messages</span>></span>1000<span class="hljs-tag"></<span class="hljs-name">max-size-messages</span>></span> |
| <span class="hljs-tag"><<span class="hljs-name">page-size-bytes</span>></span>10485760<span class="hljs-tag"></<span class="hljs-name">page-size-bytes</span>></span> |
| <span class="hljs-tag"><<span class="hljs-name">address-full-policy</span>></span>PAGE<span class="hljs-tag"></<span class="hljs-name">address-full-policy</span>></span> |
| <span class="hljs-tag"></<span class="hljs-name">address-setting</span>></span> |
| <span class="hljs-tag"></<span class="hljs-name">address-settings</span>></span> |
| </code></pre> |
| <blockquote> |
| <p><strong>Note:</strong> |
| The <a href="management.html#configuring-management">management-address</a> |
| settings cannot be changed or overridden ie management |
| messages aren't allowed to page/block/fail and are considered |
| an internal broker management mechanism. |
| The memory occupation of the <a href="management.html#configuring-management">management-address</a> |
| is not considered while evaluating if <a href="#global-max-size">global-max-size</a> |
| is hit and can't cause other non-management addresses to trigger a |
| configured <code>address-full-policy</code>.</p> |
| </blockquote> |
| <p>This is the list of available parameters on the address settings.</p> |
| <table> |
| <thead> |
| <tr> |
| <th>Property Name</th> |
| <th>Description</th> |
| <th>Default</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>max-size-bytes</code></td> |
| <td>What's the max memory the address could have before entering on page mode.</td> |
| <td>-1 (disabled)</td> |
| </tr> |
| <tr> |
| <td><code>max-size-messages</code></td> |
| <td>The max number of messages the address could have before entering on page mode.</td> |
| <td>-1 (disabled)</td> |
| </tr> |
| <tr> |
| <td><code>page-size-bytes</code></td> |
| <td>The size of each page file used on the paging system</td> |
| <td>10MB</td> |
| </tr> |
| <tr> |
| <td><code>address-full-policy</code></td> |
| <td>This must be set to <code>PAGE</code> for paging to enable. If the value is <code>PAGE</code> then further messages will be paged to disk. If the value is <code>DROP</code> then further messages will be silently dropped. If the value is <code>FAIL</code> then the messages will be dropped and the client message producers will receive an exception. If the value is <code>BLOCK</code> then client message producers will block when they try and send further messages.</td> |
| <td><code>PAGE</code></td> |
| </tr> |
| <tr> |
| <td><code>max-read-page-messages</code></td> |
| <td>how many message can be read from paging into the Queue whenever more messages are needed. The system wtill stop reading if `max-read-page-bytes hits the limit first.</td> |
| <td>1000</td> |
| </tr> |
| <tr> |
| <td><code>max-read-page-bytes</code></td> |
| <td>how much memory the messages read from paging can take on the Queue whenever more messages are needed. The system will stop reading if <code>max-read-page-messages</code> hits the limit first.</td> |
| <td>2 * page-size-bytes</td> |
| </tr> |
| </tbody> |
| </table> |
| <h3 id="max-size-bytes-and-max-size-messages-simultaneous-usage">max-size-bytes and max-size-messages simultaneous usage</h3> |
| <p>It is possible to define max-size-messages (as the maximum number of messages) and max-messages-size (as the max number of estimated memory used by the address) concurrently. The configured policy will start based on the first value to reach its mark.</p> |
| <h4 id="maximum-read-from-page">Maximum read from page</h4> |
| <p><code>max-read-page-messages</code> and <code>max-read-page-bytes</code> are used to control messaging reading from paged file into the Queue. The broker will add messages on the Queue until either <code>max-read-page-meessages</code> or <code>max-read-page-bytes</code> reaches the limit.</p> |
| <h2 id="global-max-size">Global Max Size</h2> |
| <p>Beyond the <code>max-size-bytes</code> on the address you can also set the global-max-size |
| on the main configuration. If you set <code>max-size-bytes</code> = <code>-1</code> on paging the |
| <code>global-max-size</code> can still be used.</p> |
| <h2 id="global-max-messages">Global Max Messages</h2> |
| <p>You can also specify <code>global-max-messages</code> on the main configuration, specifying how many messages the system would accept before entering into the configured full policy mode configured.</p> |
| <p>When you have more messages than what is configured <code>global-max-size</code> any new |
| produced message will make that destination to go through its paging policy. </p> |
| <p><code>global-max-size</code> is calculated as half of the max memory available to the Java |
| Virtual Machine, unless specified on the <code>broker.xml</code> configuration.</p> |
| <p>By default <code>global-max-messages</code> = <code>-1</code> meaning it's disabled.</p> |
| <h2 id="dropping-messages">Dropping messages</h2> |
| <p>Instead of paging messages when the max size is reached, an address can also be |
| configured to just drop messages when the address is full.</p> |
| <p>To do this just set the <code>address-full-policy</code> to <code>DROP</code> in the address settings</p> |
| <h2 id="dropping-messages-and-throwing-an-exception-to-producers">Dropping messages and throwing an exception to producers</h2> |
| <p>Instead of paging messages when the max size is reached, an address can also be |
| configured to drop messages and also throw an exception on the client-side when |
| the address is full.</p> |
| <p>To do this just set the <code>address-full-policy</code> to <code>FAIL</code> in the address settings</p> |
| <h2 id="blocking-producers">Blocking producers</h2> |
| <p>Instead of paging messages when the max size is reached, an address can also be |
| configured to block producers from sending further messages when the address is |
| full, thus preventing the memory being exhausted on the server.</p> |
| <p>When memory is freed up on the server, producers will automatically unblock and |
| be able to continue sending.</p> |
| <p>To do this just set the <code>address-full-policy</code> to <code>BLOCK</code> in the address |
| settings</p> |
| <p>In the default configuration, all addresses are configured to block producers |
| after 10 MiB of data are in the address.</p> |
| <h2 id="caution-with-addresses-with-multiple-multicast-queues">Caution with Addresses with Multiple Multicast Queues</h2> |
| <p>When a message is routed to an address that has multiple multicast queues bound |
| to it, e.g. a JMS subscription in a Topic, there is only 1 copy of the message |
| in memory. Each queue only deals with a reference to this. Because of this the |
| memory is only freed up once all queues referencing the message have delivered |
| it.</p> |
| <p>If you have a single lazy subscription, the entire address will suffer IO |
| performance hit as all the queues will have messages being sent through an |
| extra storage on the paging system.</p> |
| <p>For example:</p> |
| <ul> |
| <li><p>An address has 10 multicast queues</p> |
| </li> |
| <li><p>One of the queues does not deliver its messages (maybe because of a |
| slow consumer).</p> |
| </li> |
| <li><p>Messages continually arrive at the address and paging is started.</p> |
| </li> |
| <li><p>The other 9 queues are empty even though messages have been sent.</p> |
| </li> |
| </ul> |
| <p>In this example all the other 9 queues will be consuming messages from the page |
| system. This may cause performance issues if this is an undesirable state.</p> |
| <h2 id="max-disk-usage">Max Disk Usage</h2> |
| <p>The System will perform scans on the disk to determine if the disk is beyond a |
| configured limit. These are configured through <code>max-disk-usage</code> in percentage. |
| Once that limit is reached any message will be blocked. (unless the protocol |
| doesn't support flow control on which case there will be an exception thrown |
| and the connection for those clients dropped).</p> |
| <h2 id="page-sync-timeout">Page Sync Timeout</h2> |
| <p>The pages are synced periodically and the sync period is configured through |
| <code>page-sync-timeout</code> in nanoseconds. When using NIO journal, by default has |
| the same value of <code>journal-buffer-timeout</code>. When using ASYNCIO, the default |
| should be <code>3333333</code>.</p> |
| <h2 id="memory-usage-from-paged-messages">Memory usage from Paged Messages.</h2> |
| <p>The system should keep at least one paged file in memory caching ahead reading messages. |
| Also every active subscription could keep one paged file in memory. |
| So, if your system has too many queues it is recommended to minimize the page-size.</p> |
| <h2 id="example">Example</h2> |
| <p>See the <a href="examples.html#paging">Paging Example</a> which shows how to use paging with |
| Apache ActiveMQ Artemis.</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="large-messages.html" class="navigation navigation-prev " aria-label="Previous page: Large Messages"> |
| <i class="fa fa-angle-left"></i> |
| </a> |
| |
| |
| <a href="scheduled-messages.html" class="navigation navigation-next " aria-label="Next page: Scheduled Messages"> |
| <i class="fa fa-angle-right"></i> |
| </a> |
| |
| |
| |
| </div> |
| |
| <script> |
| var gitbook = gitbook || []; |
| gitbook.push(function() { |
| gitbook.page.hasChanged({"page":{"title":"Paging","level":"1.37","depth":1,"next":{"title":"Scheduled Messages","level":"1.38","depth":1,"path":"scheduled-messages.md","ref":"scheduled-messages.md","articles":[]},"previous":{"title":"Large Messages","level":"1.36","depth":1,"path":"large-messages.md","ref":"large-messages.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,"ignoreSpecialCharacters":false},"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":{},"version":"2.24.0","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":"paging.md","mtime":"2022-08-08T16:17:30.748Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2022-08-08T16:18:17.607Z"},"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> |
| |