Commit Graph

6 Commits

Author SHA1 Message Date
Waldemar Quevedo
17713175b5 js: Test updates
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2021-02-24 14:57:04 -08:00
Derek Collison
60de70431f JetStream API updates
Signed-off-by: Derek Collison <derek@nats.io>
2020-11-30 06:46:23 -08:00
Derek Collison
b9917b8e17 Changes to default pending and default error handler.
Slow consumer state still seems off, this is a first step trying to improve.
Increased the default number of pending messages limit but kept bytes the same.

Also introduced a default ErrHandler that will print out to stderr in case none has been set.

Signed-off-by: Derek Collison <derek@nats.io>
2020-11-15 11:06:26 -08:00
Ivan Kozlovic
8a78c4e118 [ADDED] RetryOnFailedConnect option
Normally, nats.Connect() would fail if there is no server available
when this call is executed. With this new option, if no connection
can be made, this call will return no error and will trigger code
similar to the reconnect code. Therefore, MaxReconnect and ReconnectWait
options are used as if the library had been disconnected and is trying
to reconnect.
Note that subscription and publish calls will also behave as if the
library was in reconnection mode, which means that the calls are
buffered and produce no error until the reconnect buffer size is
full.
Obviously, since the connection is not connected, Flush or Request/Reply
calls would timeout.

If the ReconnectHandler is set, it will be invoked if the library
connects asynchronously.

Unrelated: fixed a test that had a t.skip()...

Resolves #195

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-07-07 18:00:19 -06:00
Derek Collison
d6913a8371 Run norace tests, revert go.mod
Signed-off-by: Derek Collison <derek@nats.io>
2019-11-12 10:16:58 -08:00
Derek Collison
dcd457d195 PubSub from same connection was contending on lock checking closed state.
Signed-off-by: Derek Collison <derek@nats.io>
2019-11-12 09:45:16 -08:00