How to use the @stomp/stompjs.Stomp function in @stomp/stompjs

To help you get started, we’ve selected a few @stomp/stompjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse / vorto-examples / vorto-middleware / middleware-service / frontend / src / app / service / monitoring / websocket.service.ts View on Github external
public connect() {
    const socket = SocketFactory;
    this.stompClient = Stomp.Stomp.over(socket);
    this.stompClient.reconnectDelay = 5000;
    this.stompClient.heartbeatIncoming = 0; // Typical value 0 - disabled
    this.stompClient.heartbeatOutgoing = 20000; // Typical value 20000 - every 20 seconds
    const _this = this;
    this.stompClient.connect({}, function(frame) {
      console.log('Connected to websocket. Now subscribing: ' + frame);

      _this.stompClient.send('/middleware/endpoint/subscribe');

      let group = []

      _this.messageSubscription = _this.stompClient.subscribe('/topic/device/', function(response) {
        _this.messageActivity();
        const msg = JSON.parse(response.body);
        group = _this._correlatedMessages.value[msg.correlationId];
        if (group) {
github WISE-Community / WISE / src / main / webapp / wise5 / classroomMonitor / src / polyfills.ts View on Github external
/***************************************************************************************************
 * APPLICATION IMPORTS
 */
import * as jQuery from 'jquery';
import * as fabric from 'fabric';
import * as StompJS from '@stomp/stompjs';
import * as SockJS from 'sockjs-client';
import * as Highcharts from '../../lib/highcharts/highcharts.src';
import * as hopscotch from 'hopscotch';
import * as EventEmitter2 from 'eventemitter2';

window['$'] = jQuery;
window['jQuery'] = jQuery;
window['fabric'] = fabric.fabric;
window['SockJS'] = SockJS;
window['Stomp'] = StompJS.Stomp;
window['hopscotch'] = hopscotch;
window['Highcharts'] = Highcharts;
window['EventEmitter2'] = EventEmitter2;
github WISE-Community / WISE / src / main / webapp / wise5 / authoringTool / src / polyfills.ts View on Github external
* APPLICATION IMPORTS
 */
import 'zone-blacklist.js';
import * as jQuery from 'jquery';
import * as fabric from 'fabric';
import * as StompJS from '@stomp/stompjs';
import * as SockJS from 'sockjs-client';
import * as Highcharts from '../../lib/highcharts/highcharts.src';
import * as hopscotch from 'hopscotch';
import * as EventEmitter2 from 'EventEmitter2';

window['$'] = jQuery;
window['jQuery'] = jQuery;
window['fabric'] = fabric.fabric;
window['SockJS'] = SockJS;
window['Stomp'] = StompJS.Stomp;
window['hopscotch'] = hopscotch;
window['Highcharts'] = Highcharts;
window['EventEmitter2'] = EventEmitter2;
import * as summernote from 'summernote';
window['summernote'] = summernote;
github WISE-Community / WISE / src / main / webapp / wise5 / vle / src / polyfills.ts View on Github external
*/
import * as jQuery from 'jquery';
import * as fabric from 'fabric';
import * as StompJS from '@stomp/stompjs';
import * as SockJS from 'sockjs-client';
import * as Highcharts from '../../lib/highcharts/highcharts.src';
import * as hopscotch from 'hopscotch';
import * as EventEmitter2 from 'eventemitter2';
import * as draggablePoints from '../../lib/draggable-points/draggable-points';
import * as HighchartsExporting from '../../lib/highcharts-exporting@4.2.1';

window['$'] = jQuery;
window['jQuery'] = jQuery;
window['fabric'] = fabric.fabric;
window['SockJS'] = SockJS;
window['Stomp'] = StompJS.Stomp;
window['hopscotch'] = hopscotch;
window['Highcharts'] = Highcharts;
window['EventEmitter2'] = EventEmitter2;
import * as summernote from 'summernote';
window['summernote'] = summernote;
window['draggablePoints'] = draggablePoints;
window['HighchartsExporting'] = HighchartsExporting;

@stomp/stompjs

STOMP client for Javascript and Typescript

Apache-2.0
Latest version published 1 year ago

Package Health Score

63 / 100
Full package analysis