import SockJS from "sockjs-client";
import Stomp from "stompjs";
connection() {
//
this.socket = new SockJS("http://192.168.6.67:8081/endpoint");
this.stompClient = Stomp.over(this.socket);
// websocket
this.stompClient.connect({}, () => {
this.stompClient.subscribe("/user/39/message", (msg) => {
console.log(222)
console.log(msg.body);
});
}, (err) => {
console.log(err)
});
},
I don"t know if the things on my front end are wrong. I can use one-to-many ("/ topic/getResponse"), but not one-to-one ("/ user/39/message"). Please give me some advice
.