We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
One subscribe to @SubscribeMapping should return one message, but when subscribe multiple times, excessive messages are returned:
@SubscribeMapping
Client:
stompClient.subscribe('/app/msg', function(msg) { console.log("subscribe1 callback"); }); stompClient.subscribe('/app/msg', function(msg) { console.log("subscribe2 callback"); });
Server:
@SubscribeMapping("/msg") public Greeting msg() { return new Greeting("Hello, World!"); }
Expected: Two messages with content Hello, World! returned.
Hello, World!
But excessive messages are returned.
Logs:
Web Socket Opened... 18:10:24.104 stomp.min.js:8 >>> CONNECT accept-version:1.1,1.0 heart-beat:10000,10000 18:10:24.173 stomp.min.js:8 <<< CONNECTED version:1.1 heart-beat:0,0 18:10:24.174 stomp.min.js:8 connected to server undefined 18:10:24.181 app.js?_=dsd:24 Connected: CONNECTED heart-beat:0,0 version:1.1 18:10:24.182 stomp.min.js:8 >>> SUBSCRIBE id:sub-0 destination:/app/msg 18:10:24.182 stomp.min.js:8 >>> SUBSCRIBE id:sub-1 destination:/app/msg 18:10:25.271 stomp.min.js:8 <<< MESSAGE destination:/app/msg message-id:559f29a724bd48b794f270b71a18aa71-1 content-type:application/json;charset=UTF-8 subscription:sub-0 content-length:27 {"content":"Hello, World!"} 18:10:25.272 app.js?_=dsd:34 subscribe1 callback 18:10:25.273 stomp.min.js:8 <<< MESSAGE destination:/app/msg message-id:559f29a724bd48b794f270b71a18aa71-1 content-type:application/json;charset=UTF-8 subscription:sub-1 content-length:27 {"content":"Hello, World!"} 18:10:25.273 app.js?_=dsd:37 subscribe2 callback 18:10:25.277 stomp.min.js:8 <<< MESSAGE destination:/app/msg message-id:559f29a724bd48b794f270b71a18aa71-0 content-type:application/json;charset=UTF-8 subscription:sub-0 content-length:27 {"content":"Hello, World!"} 18:10:25.277 app.js?_=dsd:34 subscribe1 callback 18:10:25.278 stomp.min.js:8 <<< MESSAGE destination:/app/msg message-id:559f29a724bd48b794f270b71a18aa71-0 content-type:application/json;charset=UTF-8 subscription:sub-1 content-length:27 {"content":"Hello, World!"} 18:10:25.279 app.js?_=dsd:37 subscribe2 callback
Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
One subscribe to
@SubscribeMapping
should return one message, but when subscribe multiple times, excessive messages are returned:Client:
Server:
Expected:
Two messages with content
Hello, World!
returned.But excessive messages are returned.
Logs:
Thanks!
The text was updated successfully, but these errors were encountered: