spring-projects / spring-projects/spring-session

Help in configuration of Spring Session with WebSocketConfigurer and without StompBroker

Open
#644 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
1.9k
Forks
1.2k
Avg merge
4h 27m
Merged PRs (30d)
55

Description

Hi guys,

I'm trying to use Spring Session with websockets, but I have not a StompBroker so I cannot extends directly your AbstractWebSocketMessageBrokerConfigurer . I need custom handlers... also.

My Websocket conf i very basic and it looks like this:

import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
...
public class WebSocketBWConfiguration implements WebSocketConfigurer {
  @Override
  public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
    registry.addHandler(new BWebSocketHandler(), "/api/deals").setAllowedOrigins("*").addInterceptors(new HttpSessionHandshakeInterceptor());
 }
}

BWebSocketHandler is my custom Handler.
Can you suggest me howto have Spring Session working with this websocket configuration ?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the WebSocketBWConfiguration, WebSocketConfigurer, BWebSocketHandler, and HttpSessionHandshakeInterceptor shown in the issue, then inspect Spring Session's WebSocket integration guidance. Determine whether the custom-handler configuration is supported without a StompBroker and document the required setup or limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.