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

Handle STOMP messages from client session in order #21798

Closed
spring-projects-issues opened this issue Sep 10, 2018 · 1 comment
Closed

Handle STOMP messages from client session in order #21798

spring-projects-issues opened this issue Sep 10, 2018 · 1 comment
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Marcus Held opened SPR-17265 and commented

In my project I have the case that a client can potentially send a lot of messages simultaneously (which we prefer to avoid, but still can happen. Esp. with hacked clients). This leads to many different threads to modify the state of the same entity which then cause optimistic locking exceptions.

To avoid this I'd like to process all messages of the same client in the same thread. This behavior could be achieved by configuring a ThreadPoolTaskExecutor that distributes the messages accordingly. This strategy was suggested in this stackoverflow question.


1 votes, 2 watchers

@spring-projects-issues spring-projects-issues added status: waiting-for-triage An issue we've not yet triaged or decided on type: enhancement A general enhancement in: web Issues in web modules (web, webmvc, webflux, websocket) and removed type: enhancement A general enhancement labels Jan 11, 2019
@rstoyanchev
Copy link
Contributor

This is similar to #18562 but for the clientInboundChannel. Most of the logic is in OrderedMessageChannelDecorator which is used to decorate the brokerChannerl. We could do the same but for the clientInboundChannel enabled through an additional property similar to preservePublishOrder.

@rstoyanchev rstoyanchev changed the title Execute Incoming Messages in the Same Thread per Websocket Session Id [SPR-17265] Execute Incoming Messages in the Same Thread per Websocket Session Id Sep 18, 2023
@rstoyanchev rstoyanchev added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 18, 2023
@rstoyanchev rstoyanchev added this to the 6.1.0-RC1 milestone Sep 18, 2023
@rstoyanchev rstoyanchev self-assigned this Sep 18, 2023
@rstoyanchev rstoyanchev changed the title Execute Incoming Messages in the Same Thread per Websocket Session Id Handle STOMP messages from client session in order Oct 10, 2023
rstoyanchev added a commit that referenced this issue Oct 11, 2023
rstoyanchev added a commit that referenced this issue Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants