I recently faced and issue, unfortunately on production environment, when my Spring Boot Server was not sending response of CONNECT frame (i.e CONNECTED frame). It first started happening occasionally but later on all the CONNECT requests sent by the browser were not replied to.
On console I was able to see following log

After some investigating, I found out that inboundChannel queue was holding many requests at that time. I believe this was the reason.
2022-06-01 18:22:59,943 INFO Thread-id-74- springframework.web.socket.config.WebSocketMessageBrokerStats: WebSocketSession[130 current WS(129)-HttpStream(1)-HttpPoll(0), 225 total, 0 closed abnormally (0 connect failure, 0 send limit, 2 transport error)], stompSubProtocol[processed CONNECT(220)-CONNECTED(132)-DISCONNECT(0)], stompBrokerRelay[null], inboundChannel[pool size = 2, active threads = 2, queued tasks = 10774, completed tasks = 31806], outboundChannel[pool size = 2, active threads = 0, queued tasks = 0, completed tasks = 570895], sockJsScheduler[pool size = 1, active threads = 1, queued tasks = 134, completed tasks = 1985]
I was wondering what might be the cause of the issue, what can cause queuing in the inboundChannel queue?
here is my current STOMP config on my angular application.
const config: StompJS.StompConfig = {
brokerURL: this.serverUrl,
connectHeaders: {
ccid: this.cookieService.get('ccid'),
username: `${this.globalContext.get('me')['username']}`,
},
debug: (str) => {
this.loggerService.log(this.sessionId, ' | ', str);
},
webSocketFactory: () => {
return new SockJS(this.serverUrl);
},
logRawCommunication: true,
reconnectDelay: 3000,
heartbeatIncoming: 100,
heartbeatOutgoing: 100,
discardWebsocketOnCommFailure: true,
connectionTimeout: 4000
};
