Skip to content

Support destination variable placeholders in @SendTo and @SendToUser for STOMP endpoints [SPR-12170] #16784

@spring-projects-issues

Description

@spring-projects-issues

Sergi Almar opened SPR-12170 and commented

Default destination to send return values of message handler methods can be overridden using either @SendTo or @SendToUser, but destination needs to be statically specified. It would be useful to pass variables or at least expose @MessageMapping destination placeholders. Here's an example:

@MessageMapping("/chat.message.{roomName}")
@SendTo("/topic/chat.message.filtered.{roomName}")
public ChatMessage filterMessage(@Payload ChatMessage message) {
...		
}

Affects: 4.1 GA

Issue Links:

Referenced from: pull request #645, and commits 16ee692

1 votes, 10 watchers

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