Search code examples
springwebsocketstompspring-websocket

Spring websocket get user subscription from stomp id


Using Spring 4.0.4 I made a DisconnectHandler that implements ApplicationListener on SessionDisconnectEvent.

I can get the sessionid from the event but how do I get a list of the subscriptions for that sessionid, i.e the user?


Solution

  • There is currently no way to get a list of subscriptions for a user. You can keep track of subscription messages as they arrive (not very hard to do). We do have a ticket to make this easier https://jira.spring.io/browse/SPR-12029.