You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See #2837
Give priority to accepting new connections over reading data from
existing connections.
Add a flag to allow users to revert to the previous behavior of
giving reads priority.
**cherry-pick to 5.1.x**
Copy file name to clipboardExpand all lines: spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/AbstractConnectionFactory.java
+1-1
Original file line number
Diff line number
Diff line change
@@ -726,7 +726,7 @@ else if (key.isAcceptable()) {
726
726
doAccept(selector, server, now);
727
727
}
728
728
catch (Exceptione) {
729
-
logger.error("Exception accepting new connection", e);
729
+
logger.error("Exception accepting new connection(s)", e);
Copy file name to clipboardExpand all lines: spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioServerConnectionFactory.java
Copy file name to clipboardExpand all lines: spring-integration-ip/src/test/java/org/springframework/integration/ip/tcp/connection/TcpNioConnectionTests.java
Copy file name to clipboardExpand all lines: src/reference/asciidoc/ip.adoc
+4
Original file line number
Diff line number
Diff line change
@@ -974,6 +974,10 @@ Alternatively, you can insert a resequencer downstream of the inbound endpoint t
974
974
If you set `apply-sequence` to `true` on the connection factory, messages arriving on a TCP connection have `sequenceNumber` and `correlationId` headers set.
975
975
The resequencer uses these headers to return the messages to their proper sequence.
976
976
977
+
IMPORTANT: Starting with version 5.1.4, priority is given to accepting new connections over reading from existing connections.
978
+
This should, generally, have little impact unless you have a very high rate of new incoming connections.
979
+
If you wish to revert to the previous behavior of giving reads priority, set the `multiAccept` property on the `TcpNioServerConnectionFactory` to `false`.
Copy file name to clipboardExpand all lines: src/reference/asciidoc/whats-new.adoc
+3
Original file line number
Diff line number
Diff line change
@@ -36,3 +36,6 @@ See <<remote-persistent-flf>> for more information.
36
36
37
37
The length header used by the `ByteArrayLengthHeaderSerializer` can now include the length of the header in addition to the payload.
38
38
See <<tcp-codecs>> for more information.
39
+
40
+
When using a `TcpNioServerConnectionFactory`, priority is now given to accepting new connections over reading from existing connections, but it is configurable.
0 commit comments