Skip to content

On CONNECT and external broker is not available, StompBrokerRelayMessageHandler should return ERROR frame [SPR-12820] #17417

@spring-projects-issues

Description

@spring-projects-issues

Leonard Siu opened SPR-12820 and commented

According to the Stomp Specification (http://stomp.github.io/stomp-specification-1.1.html#Connecting):

The server can reject any connection attempt. The server SHOULD respond back with an ERROR frame listing why the connection was rejected and then close the connection.

However, at line# 402 of StompBrokerRelayMessageHandler class where the code simply log and error, ignores and return:

SimpMessageType messageType = SimpMessageHeaderAccessor.getMessageType(message.getHeaders());
if (logger.isErrorEnabled() && SimpMessageType.CONNECT.equals(messageType)) {
	logger.error("Broker not active. Ignoring " + message);
}
else if (logger.isDebugEnabled()) {
	logger.debug("Broker not active. Ignoring " + message);
}
return;

Affects: 4.1.5

Attachments:

Referenced from: commits 4886edd

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions