These releases are synchronized releases and add similar changes. It is expected that these releases are fully backwards compatible, however, you may need to recompile your code.
User visible changes
Websocket specification does not provide any mechanism for quickly dropping a connection. If the underlying connection is dropped and the incoming pings fail, actual closure of the Websocket may take significant time (several minutes). This new option discards the websocket immediately. This will allow a quicker reconnection.
Under the hood if the Websocket library supports
ws npm package does), it will call that to quickly drop
None of the Web browsers support any equivalent method.
In this release this flag is
off by default, set it to
to activate it.
// Set it directly or part of configuration client.discardWebsocketOnCommFailure = true;
The STOMP standard supports Heartbeats which allows detecting stale connections.
However, this mechanism activates after a successful connection (under the hood,
CONNECTED STOMP frame has been received from the broker).
This setting guards against the case that connection setup takes long time to establish. If it takes longer it will abandon the attempt and retry.
The value is number of milliseconds to wait for a successful connection.
// Set it directly or part of configuration client.connectionTimeout = 500;
deactivate - async
You are unlikely to be affected by this change.
deactivate has now been made
async, if there is an underlying
active connection, the call will wait till that is terminated.
This prevetents a race condition that may cause more that one
active underlying connection in case
invoked in quick succession.
If you were calling
activate in succession,
you should await for
By default when you initiate a watch it will be reestablished in case of a reconnection to the broker. You can set this flag while initiating a watch to subscribe only once.
Non visible changes
- The output target is
es2015. We wanted
es2017, however, that causes issue with Angular.
- The tree shaking support is quite consistent now.
In previous version
commonjsmodule system, which, was not very friendly to tree shaking.
- Remove dom lib dependency for usage with NodeJS/Typescript.