Closed nephilimboy closed 6 years ago
hi I want to use Multiple subscribes, like this:
connecting() { const socket = new SockJS('/rest/websocket/chat'); this.stompClient = Stomp.over(socket); const headers = {}; this.stompClient.connect(headers, this.onConnected()); } onConnected() { this.stompClient.subscribe('/topic/channel/' + '1', (message) => { // SOMETHING TO DO }); this.stompClient.subscribe('/topic/seenUpdate/' + '1', (message) => { // SOMETHING TO DO }); }
but when i run this, only my first subscribe work, here is the log on console.
>>> SUBSCRIBE id:sub-1513079223083-564 destination:/topic/channel/1
so how can i make it work with multiple subscribe? btw i'm using Angular 4+ with webpack. Thanks in advance
Please look at the examples and your broker documentation
https://github.com/JSteunou/webstomp-client/tree/master/example
hi I want to use Multiple subscribes, like this:
but when i run this, only my first subscribe work, here is the log on console.
so how can i make it work with multiple subscribe? btw i'm using Angular 4+ with webpack. Thanks in advance