Started by Debarghya DasSep 15, 2021

Open
Spring, Stomp: How to avoid multiple subscriptions to same destination by same user

0 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 0 VIEWES SHARE

I'm using Spring 4.2 websockets with stomp on the serverside. Client uses stomp.js. I noticed that it is possible for a user to subscribe the same topic-destination multiple times. When a message is delivered to this destination, the user receives it multiple times too.

  1. Why is this possible? What would be a use case for this?
  2. How can I avoid it? The @SubscribeMapping is called AFTER the subscription and I cannot cancel it

0 Replies

You must be Logged in to reply
Techiio

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

facebooklinkdeintwitter

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Copyright techiio.com @2020 Kolkata, India
made with by Abhishek & Priyanka Jalan
Copyright techiio.com @2020
made with by Abhishek & Priyanka Jalan