How to use the @stomp/rx-stomp.RxStomp function in @stomp/rx-stomp

To help you get started, we’ve selected a few @stomp/rx-stomp 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 stomp-js / ng2-stompjs / src / specs / app / services / rx-stomp-rpc.service.spec.ts View on Github external
beforeEach((done) => {
    rxStomp = new RxStomp();
    const rxStompConfig: RxStompConfig = (Object as any).assign({}, defaultRxStompConfig);
    // Identify log messages on the server side
    rxStompConfig.debug = (str: string) => {
      console.log('RPC Server: ', new Date(), str);
    };
    rxStomp.configure(rxStompConfig);
    rxStomp.activate();

    rxStomp.connected$.pipe(take(1)).subscribe(() => {
      const receiptId = UUID.UUID();

      rxStomp.watch(myServiceEndPoint, {receipt: receiptId}).subscribe((message: IMessage) => {
        const replyTo = message.headers['reply-to'];
        const correlationId = message.headers['correlation-id'];
        const incomingMessage = message.body;

@stomp/rx-stomp

RxJS STOMP client for Javascript and Typescript

Apache-2.0
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis