Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Reactor2TcpClient does not remove TcpClient instances after connection closed [SPR-14231] #18805
dave burns commented
Wasn't sure if I should comment on the original boot issue or open a new ticket but the issue (or similar issue) still occurs for a broker/server receiving simultaneous connections. I've modified the sample project and added a multi-threaded Junit method as a client. This launches 2000 concurrent threads, about 1100 successfully connect to the server (on my setup). I don't know if its the load or the failed connections (rather than clean disconnects) but the org.springframework.messaging.tcp.reactor.Reactor2TcpClient can be seen to be leaking following by the same instructions as in the original boot issue.
Weird thing is the original leak showed both the Reactor2TcpClient and StompBrokerRelayMessagHandler leaking, this just shows the reactor 2 client.
Noticed this in our production application, i.e. system accepting concurrent connections. The multi-threaded harness mimics this behavior.