diff --git a/docs/src/reference/docbook/ip.xml b/docs/src/reference/docbook/ip.xml index 97bd0657c4..3af13faa1e 100644 --- a/docs/src/reference/docbook/ip.xml +++ b/docs/src/reference/docbook/ip.xml @@ -149,13 +149,15 @@ the header ip_connection_id that was inserted into the original message by the connection factory. - This is the extent of message correlation performed when sharing connection - factories between inbound and outbound adapters. Such sharing allows for - asynchronous two-way communication over TCP. Only payload information is - transferred using TCP; therefore any message correlation must be performed - by downstream components such as aggregators or other endpoints. - For more information refer to - TCP Message Correlation + + This is the extent of message correlation performed when sharing connection + factories between inbound and outbound adapters. Such sharing allows for + asynchronous two-way communication over TCP. Only payload information is + transferred using TCP; therefore any message correlation must be performed + by downstream components such as aggregators or other endpoints. + For more information refer to . + + A maximum of one adapter of each type may be given a reference to a connection @@ -531,7 +533,7 @@ such as the DefaultSerializer/Deserializer which use java serialization, or a custom serializer and deserializer. The ByteArray*Serializer options - mentioned in Connection Factories, + mentioned in , including the default ByteArrayCrLfSerializer, do not support such payloads, unless the transformed payload is a String or @@ -539,6 +541,33 @@ +
+ A Note About NIO + + Using NIO (see using-nio in + ) + avoids dedicating a thread to read from each socket. For a small number + of sockets, you will likely find that not using NIO, + together with an async handoff (e.g. to a QueueChannel), + will perform as well as, or better than, using NIO. + + + Consider using NIO when handling a large number of connections. However, the use + of NIO has some other ramifications. A pool of threads (in the task executor) is + shared across all the sockets; each incoming message is assembled and sent to the + configured channel as a separate unit of work on a thread selected from that pool. + Two sequential + messages arriving on the same socket might + be processed by different threads. This means that the order in which the messages are + sent to the channel is indeterminate; the strict ordering of the messages on the + socket is not maintained. + + + For some applications, this is not an issue; for others it is. If strict ordering + is required, consider setting using-nio to false + and using async handoff. + +
IP Configuration Attributes @@ -603,8 +632,10 @@ Y Y true, false - Whether or not the tcp adapter is using NIO. Refer to the java.nio - package for more information. Default false. + Whether or not the socket handing uses NIO. Refer to the java.nio + package for more information. + See . + Default false. using-direct-buffers