Skip to content

Commit a13d57e

Browse files
committed
Updated README
1 parent 2342804 commit a13d57e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ import { RxStomp } from '@stomp/rx-stomp';
2727

2828
const rxStomp = new RxStomp();
2929
rxStomp.configure({
30+
// hostname (or ip addess) and port number of the STOMP broker
31+
webSocketFactory: () => new TCPWrapper('127.0.0.1', 61613),
3032
heartbeatOutgoing: 20000,
3133
heartbeatIncoming: 20000,
3234
debug: console.log,
33-
webSocketFactory: () => new TCPWrapper('127.0.0.1', 61613),
3435
});
3536

3637
const subscription = rxStomp
@@ -57,6 +58,8 @@ import { Client } from '@stomp/stompjs';
5758
import { TCPWrapper } from '@stomp/tcp-wrapper';
5859

5960
const client = new Client({
61+
// hostname (or ip addess) and port number of the STOMP broker
62+
webSocketFactory: () => new TCPWrapper('127.0.0.1', 61613),
6063
heartbeatOutgoing: 20000,
6164
heartbeatIncoming: 20000,
6265
debug: console.log,
@@ -66,7 +69,6 @@ const client = new Client({
6669
);
6770
client.publish({ destination: '/topic/test01', body: 'First Message' });
6871
},
69-
webSocketFactory: () => new TCPWrapper('127.0.0.1', 61613),
7072
});
7173

7274
client.activate();

0 commit comments

Comments
 (0)