Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const socket = new SockJS(GajiIdSettings.API_ADDRESS + NotificationConstants.MAIN_NOTIF_URI);
- const stompClient = Stomp.over(socket);
- stompClient.debug = null; // disable Stomp log, comment this line to see the log
- stompClient.connect({}, (frame) => {
- stompClient.subscribe(NotificationConstants.TOPIC_NOTIF_ALL, (msg) => {
- this.onNotificationData(msg);
- });
- stompClient.subscribe(NotificationConstants.TOPIC_NOTIF + '/' + this.userLogin.id, (msg) => {
- this.onNotificationData(msg);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment