Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 771 | blopes | 1 | <!DOCTYPE html SYSTEM "about:legacy-compat"> |
| 2 | <html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><link href="../images/docs-stylesheet.css" rel="stylesheet" type="text/css"><title>Apache Tomcat 9 Configuration Reference (9.0.112) - The Cluster Sender object</title></head><body><div id="wrapper"><header><div id="header"><div><div><div class="logo noPrint"><a href="https://tomcat.apache.org/"><img alt="Tomcat Home" src="../images/tomcat.png"></a></div><div style="height: 1px;"></div><div class="asfLogo noPrint"><a href="https://www.apache.org/" target="_blank"><img src="../images/asf-logo.svg" alt="The Apache Software Foundation" style="width: 266px; height: 83px;"></a></div><h1>Apache Tomcat 9 Configuration Reference</h1><div class="versionInfo"> |
||
| 3 | Version 9.0.112, |
||
| 4 | <time datetime="2025-11-06">Nov 6 2025</time></div><div style="height: 1px;"></div><div style="clear: left;"></div></div></div></div></header><div id="middle"><div><div id="mainLeft" class="noprint"><div><nav><div><h2>Links</h2><ul><li><a href="../index.html">Docs Home</a></li><li><a href="index.html">Config Ref. Home</a></li><li><a href="https://cwiki.apache.org/confluence/display/TOMCAT/FAQ">FAQ</a></li><li><a href="#comments_section">User Comments</a></li></ul></div><div><h2>Top Level Elements</h2><ul><li><a href="server.html">Server</a></li><li><a href="service.html">Service</a></li></ul></div><div><h2>Executors</h2><ul><li><a href="executor.html">Executor</a></li></ul></div><div><h2>Connectors</h2><ul><li><a href="http.html">HTTP/1.1</a></li><li><a href="http2.html">HTTP/2</a></li><li><a href="ajp.html">AJP</a></li></ul></div><div><h2>Containers</h2><ul><li><a href="context.html">Context</a></li><li><a href="engine.html">Engine</a></li><li><a href="host.html">Host</a></li><li><a href="cluster.html">Cluster</a></li></ul></div><div><h2>Nested Components</h2><ul><li><a href="cookie-processor.html">CookieProcessor</a></li><li><a href="credentialhandler.html">CredentialHandler</a></li><li><a href="globalresources.html">Global Resources</a></li><li><a href="jar-scanner.html">JarScanner</a></li><li><a href="jar-scan-filter.html">JarScanFilter</a></li><li><a href="listeners.html">Listeners</a></li><li><a href="loader.html">Loader</a></li><li><a href="manager.html">Manager</a></li><li><a href="realm.html">Realm</a></li><li><a href="resources.html">Resources</a></li><li><a href="sessionidgenerator.html">SessionIdGenerator</a></li><li><a href="valve.html">Valve</a></li></ul></div><div><h2>Cluster Elements</h2><ul><li><a href="cluster.html">Cluster</a></li><li><a href="cluster-manager.html">Manager</a></li><li><a href="cluster-channel.html">Channel</a></li><li><a href="cluster-membership.html">Channel/Membership</a></li><li><a href="cluster-sender.html">Channel/Sender</a></li><li><a href="cluster-receiver.html">Channel/Receiver</a></li><li><a href="cluster-interceptor.html">Channel/Interceptor</a></li><li><a href="cluster-valve.html">Valve</a></li><li><a href="cluster-deployer.html">Deployer</a></li><li><a href="cluster-listener.html">ClusterListener</a></li></ul></div><div><h2>web.xml</h2><ul><li><a href="filter.html">Filter</a></li></ul></div><div><h2>Other</h2><ul><li><a href="runtime-attributes.html">Runtime attributes</a></li><li><a href="systemprops.html">System properties</a></li><li><a href="jaspic.html">JASPIC</a></li></ul></div></nav></div></div><div id="mainRight"><div id="content"><h2>The Cluster Sender object</h2><h3 id="Table_of_Contents">Table of Contents</h3><div class="text"> |
||
| 5 | <ul><li><a href="#Introduction">Introduction</a></li><li><a href="#Concurrent_Parallel_Delivery">Concurrent Parallel Delivery</a></li><li><a href="#Nested_Elements">Nested Elements</a></li><li><a href="#Attributes">Attributes</a><ol><li><a href="#Common_Sender_Attributes">Common Sender Attributes</a></li><li><a href="#Common_Transport_Attributes">Common Transport Attributes</a></li><li><a href="#Common_PooledSender_Attributes">Common PooledSender Attributes</a></li></ol></li></ul> |
||
| 6 | </div><h3 id="Introduction">Introduction</h3><div class="text"> |
||
| 7 | <p> |
||
| 8 | The channel sender component is responsible for delivering outgoing cluster messages over the network. |
||
| 9 | In the default implementation, <code>org.apache.catalina.tribes.transport.ReplicationTransmitter</code>, |
||
| 10 | the sender is a fairly empty shell with not much logic around a fairly complex <code><Transport></code> |
||
| 11 | component the implements the actual delivery mechanism. |
||
| 12 | </p> |
||
| 13 | </div><h3 id="Concurrent_Parallel_Delivery">Concurrent Parallel Delivery</h3><div class="text"> |
||
| 14 | <p> |
||
| 15 | In the default <code>transport</code> implementation, <code>org.apache.catalina.tribes.transport.nio.PooledParallelSender</code>, |
||
| 16 | Apache Tribes implements what we like to call "Concurrent Parallel Delivery". |
||
| 17 | This means that we can send a message to more than one destination at the same time(parallel), and |
||
| 18 | deliver two messages to the same destination at the same time(concurrent). Combine these two and we have |
||
| 19 | "Concurrent Parallel Delivery". |
||
| 20 | </p> |
||
| 21 | <p> |
||
| 22 | When is this useful? The simplest example we can think of is when part of your code is sending a 10MB message, |
||
| 23 | like a war file being deployed, and you need to push through a small 10KB message, say a session being replicated, |
||
| 24 | you don't have to wait for the 10MB message to finish, as a separate thread will push in the small message |
||
| 25 | transmission at the same time. Currently there is no interrupt, pause or priority mechanism available, but check back soon. |
||
| 26 | </p> |
||
| 27 | </div><h3 id="Nested_Elements">Nested Elements</h3><div class="text"> |
||
| 28 | <p> |
||
| 29 | The nested element <code><Transport></code> is not required, but encouraged, as this is where |
||
| 30 | you would set all the socket options for the outgoing messages. Please see its attributes below. |
||
| 31 | There are two implementations, in a similar manner to the <a href="cluster-receiver.html">receiver</a>, one is non-blocking |
||
| 32 | based and the other is built using blocking IO. <br> |
||
| 33 | <code>org.apache.catalina.tribes.transport.bio.PooledMultiSender</code> is the blocking implementation and |
||
| 34 | <code>org.apache.catalina.tribes.transport.nio.PooledParallelSender</code>. |
||
| 35 | Parallel delivery is not available for the blocking implementation due to the fact that it is blocking a thread on sending data. |
||
| 36 | </p> |
||
| 37 | </div><h3 id="Attributes">Attributes</h3><div class="text"> |
||
| 38 | <div class="subsection"><h4 id="Common_Sender_Attributes">Common Sender Attributes</h4><div class="text"> |
||
| 39 | <table class="defaultTable"><tr><th style="width: 15%;"> |
||
| 40 | Attribute |
||
| 41 | </th><th style="width: 85%;"> |
||
| 42 | Description |
||
| 43 | </th></tr><tr id="Attributes_Common Sender Attributes_className"><td><strong><code class="attributeName">className</code></strong></td><td> |
||
| 44 | Required, only available implementation is <code>org.apache.catalina.tribes.transport.ReplicationTransmitter</code> |
||
| 45 | </td></tr></table> |
||
| 46 | </div></div> |
||
| 47 | <div class="subsection"><h4 id="Common_Transport_Attributes">Common Transport Attributes</h4><div class="text"> |
||
| 48 | <table class="defaultTable"><tr><th style="width: 15%;"> |
||
| 49 | Attribute |
||
| 50 | </th><th style="width: 85%;"> |
||
| 51 | Description |
||
| 52 | </th></tr><tr id="Attributes_Common Transport Attributes_className"><td><strong><code class="attributeName">className</code></strong></td><td> |
||
| 53 | Required, an implementation of the <code>org.apache.catalina.tribes.transport.MultiPointSender</code>.<br> |
||
| 54 | Non-blocking implementation is <code>org.apache.catalina.tribes.transport.nio.PooledParallelSender</code><br> |
||
| 55 | Blocking implementation is <code>org.apache.catalina.tribes.transport.bio.PooledMultiSender</code> |
||
| 56 | </td></tr><tr id="Attributes_Common Transport Attributes_rxBufSize"><td><code class="attributeName">rxBufSize</code></td><td> |
||
| 57 | The receive buffer size on the socket. |
||
| 58 | Default value is <code>25188</code> bytes. |
||
| 59 | </td></tr><tr id="Attributes_Common Transport Attributes_txBufSize"><td><code class="attributeName">txBufSize</code></td><td> |
||
| 60 | The send buffer size on the socket. |
||
| 61 | Default value is <code>65536</code> bytes. |
||
| 62 | </td></tr><tr id="Attributes_Common Transport Attributes_udpRxBufSize"><td><code class="attributeName">udpRxBufSize</code></td><td> |
||
| 63 | The receive buffer size on the datagram socket. |
||
| 64 | Default value is <code>25188</code> bytes. |
||
| 65 | </td></tr><tr id="Attributes_Common Transport Attributes_udpTxBufSize"><td><code class="attributeName">udpTxBufSize</code></td><td> |
||
| 66 | The send buffer size on the datagram socket. |
||
| 67 | Default value is <code>65536</code> bytes. |
||
| 68 | </td></tr><tr id="Attributes_Common Transport Attributes_directBuffer"><td><code class="attributeName">directBuffer</code></td><td> |
||
| 69 | Possible values are <code>true</code> or <code>false</code>. |
||
| 70 | Set to true if you want the receiver to use direct bytebuffers when writing data |
||
| 71 | to the sockets. Default value is <code>false</code> |
||
| 72 | </td></tr><tr id="Attributes_Common Transport Attributes_keepAliveCount"><td><code class="attributeName">keepAliveCount</code></td><td> |
||
| 73 | The number of requests that can go through the socket before the socket is closed, and reopened |
||
| 74 | for the next request. The default value is <code>-1</code>, which is unlimited. |
||
| 75 | </td></tr><tr id="Attributes_Common Transport Attributes_keepAliveTime"><td><code class="attributeName">keepAliveTime</code></td><td> |
||
| 76 | The number of milliseconds a connection is kept open after its been opened. |
||
| 77 | The default value is <code>-1</code>, which is unlimited. |
||
| 78 | </td></tr><tr id="Attributes_Common Transport Attributes_timeout"><td><code class="attributeName">timeout</code></td><td> |
||
| 79 | Sets the SO_TIMEOUT option on the socket. The value is in milliseconds and the default value is <code>3000</code> |
||
| 80 | milliseconds.(3 seconds) This timeout starts when a message send attempt is starting, until the transfer has been completed. |
||
| 81 | For the NIO sockets, this will mean, that the caller can guarantee that we will not attempt sending the message |
||
| 82 | longer than this timeout value. For the blocking IO implementation, this translated directly to the soTimeout.<br> |
||
| 83 | A timeout will not spawn a retry attempt, in order to guarantee the return of the application thread. |
||
| 84 | </td></tr><tr id="Attributes_Common Transport Attributes_maxRetryAttempts"><td><code class="attributeName">maxRetryAttempts</code></td><td> |
||
| 85 | How many times do we retry a failed message, that received a IOException at the socket level. |
||
| 86 | The default value is <code>1</code>, meaning we will retry a message that has failed once. |
||
| 87 | In other words, we will attempt a message send no more than twice. One is the original send, and one is the |
||
| 88 | <code>maxRetryAttempts</code>. |
||
| 89 | </td></tr><tr id="Attributes_Common Transport Attributes_ooBInline"><td><code class="attributeName">ooBInline</code></td><td> |
||
| 90 | Boolean value for the socket OOBINLINE option. Possible values are <code>true</code> or <code>false</code>. |
||
| 91 | </td></tr><tr id="Attributes_Common Transport Attributes_soKeepAlive"><td><code class="attributeName">soKeepAlive</code></td><td> |
||
| 92 | Boolean value for the socket SO_KEEPALIVE option. Possible values are <code>true</code> or <code>false</code>. |
||
| 93 | </td></tr><tr id="Attributes_Common Transport Attributes_soLingerOn"><td><code class="attributeName">soLingerOn</code></td><td> |
||
| 94 | Boolean value to determine whether to use the SO_LINGER socket option. |
||
| 95 | Possible values are <code>true</code> or <code>false</code>. Default value is <code>true</code>. |
||
| 96 | </td></tr><tr id="Attributes_Common Transport Attributes_soLingerTime"><td><code class="attributeName">soLingerTime</code></td><td> |
||
| 97 | Sets the SO_LINGER socket option time value. The value is in seconds. |
||
| 98 | The default value is <code>3</code> seconds. |
||
| 99 | </td></tr><tr id="Attributes_Common Transport Attributes_soReuseAddress"><td><code class="attributeName">soReuseAddress</code></td><td> |
||
| 100 | Boolean value for the socket SO_REUSEADDR option. Possible values are <code>true</code> or <code>false</code>. |
||
| 101 | </td></tr><tr id="Attributes_Common Transport Attributes_soTrafficClass"><td><code class="attributeName">soTrafficClass</code></td><td> |
||
| 102 | Sets the traffic class level for the socket, the value is between 0 and 255. |
||
| 103 | Default value is <code>int soTrafficClass = 0x04 | 0x08 | 0x010;</code> |
||
| 104 | Different values are defined in <a href="https://docs.oracle.com/javase/8/docs/api/java/net/Socket.html#setTrafficClass(int)"> |
||
| 105 | java.net.Socket#setTrafficClass(int)</a>. |
||
| 106 | </td></tr><tr id="Attributes_Common Transport Attributes_tcpNoDelay"><td><code class="attributeName">tcpNoDelay</code></td><td> |
||
| 107 | Boolean value for the socket TCP_NODELAY option. Possible values are <code>true</code> or <code>false</code>. |
||
| 108 | The default value is <code>true</code> |
||
| 109 | </td></tr><tr id="Attributes_Common Transport Attributes_throwOnFailedAck"><td><code class="attributeName">throwOnFailedAck</code></td><td> |
||
| 110 | Boolean value, default value is <code>true</code>. |
||
| 111 | If set to true, the sender will throw a <code>org.apache.catalina.tribes.RemoteProcessException</code> |
||
| 112 | when we receive a negative ack from the remote member. |
||
| 113 | Set to false, and Tribes will treat a positive ack the same way as a negative ack, that the message was received. |
||
| 114 | </td></tr></table> |
||
| 115 | </div></div> |
||
| 116 | <div class="subsection"><h4 id="Common_PooledSender_Attributes">Common PooledSender Attributes</h4><div class="text"> |
||
| 117 | <table class="defaultTable"><tr><th style="width: 15%;"> |
||
| 118 | Attribute |
||
| 119 | </th><th style="width: 85%;"> |
||
| 120 | Description |
||
| 121 | </th></tr><tr id="Attributes_Common PooledSender Attributes_poolSize"><td><code class="attributeName">poolSize</code></td><td> |
||
| 122 | The maximum number of concurrent connections from A to B. |
||
| 123 | The value is based on a per-destination count. |
||
| 124 | The default value is <code>25</code> |
||
| 125 | </td></tr><tr id="Attributes_Common PooledSender Attributes_maxWait"><td><code class="attributeName">maxWait</code></td><td> |
||
| 126 | The maximum number of milliseconds that the senderPool will wait when |
||
| 127 | there are no available senders. The default value is <code>3000</code> |
||
| 128 | milliseconds.(3 seconds). |
||
| 129 | </td></tr></table> |
||
| 130 | </div></div> |
||
| 131 | </div></div></div></div></div><footer><div id="footer"> |
||
| 132 | Copyright © 1999-2025, The Apache Software Foundation |
||
| 133 | <br> |
||
| 134 | Apache Tomcat, Tomcat, Apache, the Apache Tomcat logo and the Apache logo |
||
| 135 | are either registered trademarks or trademarks of the Apache Software |
||
| 136 | Foundation. |
||
| 137 | </div></footer></div></body></html> |