Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STOMP broker relay only allows up to 15 client connections [SPR-16626] #21167

spring-projects-issues opened this issue Mar 22, 2018 · 1 comment
in: web type: enhancement


Copy link

spring-projects-issues commented Mar 22, 2018

Stephen Franklin opened SPR-16626 and commented

I'm using Spring Messaging and Websocket to connect to RabbitMQ. I'm only able to make 15 client websocket connections to RabbitMQ, plus one system connection. Attempting to connect more than 15 clients times out after 45 seconds with the following exception:

ERROR 20500 --- [ient-loop-nio-4] o.s.m.s.s.StompBrokerRelayMessageHandler : TCP connection failure in session f: Failed to connect: Acquire operation took longer then configured maximum time

java.util.concurrent.TimeoutException: Acquire operation took longer then configured maximum time
at<init>(...)(Unknown Source) ~[netty-transport-4.1.21.Final.jar:4.1.21.Final]

This can be reproduced using the websocket guide at by configuring the stomp broker relay to connect to an external broker and attempting to connect more than 15 times.

Affects: 5.0.4

Copy link
Collaborator Author

spring-projects-issues commented Mar 23, 2018

Rossen Stoyanchev commented

Indeed, after the switch to Reactor 3.x in Spring Framework 5, we're using a fixed connection pool too that's small if many clients try to connect at the same time. I switched to an elastic strategy and confirmed that can sustain higher concurrency.

We're expecting to release on Tuesday, March 27th. In the mean time, you can try with 5.0.5.BUILD-SNAPSHOT.

There is also a way to configure ReactorNettyTcpClient with the elastic pool yourself, and then use the tcpClient property on StompBrokerRelayMessageHandler but the fix should be released soon enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: web type: enhancement
None yet

No branches or pull requests

2 participants