How to use @stomp/ng2-stompjs - 3 common examples

To help you get started, we’ve selected a few @stomp/ng2-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 suricate-io / suricate / src / main / webapp / app / shared / services / frontend / websocket.service.ts View on Github external
private getWebsocketConfig(): StompConfig {
    const stompConfig = new StompConfig();
    stompConfig.url = () => new SockJS(WebsocketService.baseWsEndpoint);
    stompConfig.heartbeat_in = 0;
    stompConfig.heartbeat_out = 20000;
    stompConfig.reconnect_delay = 1000;
    stompConfig.debug = true;

    return stompConfig;
  }
github suricate-io / suricate / frontend / src / app / shared / services / websocket.service.ts View on Github external
getWebsocketConfig(): StompConfig {
    const stompConfig = new StompConfig();
    stompConfig.url = () => new SockJS(baseWsEndpoint);
    stompConfig.heartbeat_in = 0;
    stompConfig.heartbeat_out = 20000;
    stompConfig.reconnect_delay = 1000;
    stompConfig.debug = true;

    return stompConfig;
  }
github Redislabs-Solution-Architects / rediscogs / client / src / app / favorite-albums / favorite-albums.component.ts View on Github external
connectStompService(config: any) {
    const stompUrl = config.protocol + '://' + config.host + ':' + config.port + config.endpoint;
    const stompConfig: StompConfig = {
      url: stompUrl,
      headers: {
        login: '',
        passcode: ''
      },
      heartbeat_in: 0,
      heartbeat_out: 20000,
      reconnect_delay: 5000,
      debug: true
    };
    this.stompService = new StompService(stompConfig);
    this.stompService.subscribe(config.likesTopic).subscribe(like => this.likes.unshift(JSON.parse(like.body)));
  }

@stomp/ng2-stompjs

Angular 6/7/8/9/10 [![Build Status](https://travis-ci.org/stomp-js/ng2-stompjs.svg?branch=master)](https://travis-ci.org/stomp-js/ng2-stompjs)

Apache-2.0
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis