Skip to content

Releases: nats-io/nats.go

Release v1.8.0

04 Jun 00:26
b7c46b0
Compare
Choose a tag to compare

Changelog

Some of you may have noticed that there was temporarily a v2.0.0 tag.
We wanted to align the client version to the upcoming NATS Server 2.0 release.
However, there was no backward compatibility breaking changes in the client and
the go.mod rules for a v2 would have force us, and users, to add v2 to the import paths.
This would not be justified since, again, there are no breaking changes.

So we have removed the tag and instead released v1.8.0. We are deeply sorry for the
inconvenience but we hope that you will understand why we did this.

Changed

  • The repository has been renamed to nats.go. When doing a go get github.com/nats-io/nats.go/, make sure to include the trailing / to avoid such error: stat github.com/nats-io/nats.go: no such file or directory.
  • The default URL (nats.DefaultURL) has been changed from nats://localhost:4222 to nats://127.0.0.1:4222 (#460)

Added

  • ConnErrHandler: handler which can be invoked when a disconnect event occurs. Unlike ConnHandler, you can get the error that caused the disconnect event. Thanks to @mkorolyov for the contribution (#462, #464)
  • Message.Respond() to be able to conveniently reply to a request message from the message handler (#472)

Deprecated

  • DisconnectedCB, DisconnectHandler: Use DisconnectedErrCB,DisconnectErrHandler instead (#462, #464)

Improved

  • Some cleanup with use of RWMutex, removal of un-needed defer, etc... Thanks to @MaruHyl for the contributions (#434, #437, #438)
  • Refactor some of the examples. Thanks to @andyxning for the contribution (#440)

Fixed

  • Proper randomization of IPs resolved from a hostname prior to dial (#445)
  • Misleading TLS error report due to credential file errors (#446)
  • Race on synchronous subscription type setting (#447)
  • Examples would not exit after printing usage, possibly causing panic (#456, #465)
  • Some typos. Thanks to @0xflotus for the contribution (#471)

Complete Changes

v1.7.2...v1.8.0

Release v1.7.2

21 Feb 23:31
Compare
Choose a tag to compare

Changelog

Added

  • Ability to set MaxPingsOutstanding as an Option (#414)
  • Conn.ConnectedAddr() (#426)
  • FlushWithContext() (#433)

Updated

  • Handle host names that resolve to more than one IP (#417)
  • Disable automatic TLS skip verify (#420)
  • Examples and Benchmarks can use new credentials based authentication and authorization (#419)
  • Smarter kickFlusher behavior (#429)
  • Smarter processing on NextMsg() when a message already available (#432)

Improved

  • Better handling of TLS errors. Thanks to @brianshannan for the contribution (#418)
  • Updates to samples in docs (#422, #421)
  • Uses staticcheck now vs megacheck

Fixed

  • Maintain string case for async errors from the server (#415)

Complete Changes

nats-io/go-nats@v1.7.0...v1.7.2

Release v1.7.0

11 Dec 16:14
Compare
Choose a tag to compare

Changelog

Added

  • Ability to retrieve CID from server the client is currently connected to (#395)
  • NKey support (#399)
  • TokenHandler option. Thanks to @nicholaslam for the contribution (#405)
  • Support for User JWTs (#408)
  • FlusherTimeout option to allow all writes to honor the deadline. Thanks to @gwik for the contribution (#393)

Updated

  • Examples moved to separate directories so they can be "go install"'ed (#406)
  • Allow expressed url parameters to influence implicit servers (#409, #410)
  • Some updates for NGS support (#400)

Improved

  • Faster and smaller reply subjects (#402)

Fixed

  • Set connection's last error if async error occurs during Drain (#392)

Complete Changes

nats-io/go-nats@v1.6.0...v1.7.0

Release v1.6.0

29 Aug 17:31
fb0396e
Compare
Choose a tag to compare

Changelog

Added

  • PingInterval() option. Thanks to @karpovicham for the contribution (#361)
  • Ability to suppress receiving messages published by own connection, aka NoEcho() option. Requires server 1.2.0+ (#375)
  • Ability to drain subscriptions and/or connections (#378, #380)

Improved

  • Simpler URLs. It is now possible to simply pass hostname without scheme nor port (which defaults to 4222). That is, nats.Connect("myhost") is now equivalent to nats.Connect("nats://myhost:4222"). Also switches automatically to secure connection (TLS) if server requests it (#381)

Fixed

  • Possible deadlock in asynchronous connection callbacks. Thanks to @teh-cmc for the contribution (#365, #369)
  • Close() may not release resources immediately. Thanks to @mjgarton for the report (#370)
  • Benchmark tool (nats-bench) now starts subscriber's timer when getting the first message (#379)
  • API Documentation related to creation of various subscription types. Thanks to @nussjustin for the report (#383)
  • Panic if passing a nil option to nats.Connect(). They will now be ignored (#385)
  • RequestWithContext or NextMsgWithContext could return a message although the context was canceled or timed-out (#387)

Complete Changes

nats-io/go-nats@v1.5.0...v1.6.0

Release v1.5.0

23 Mar 17:01
062418e
Compare
Choose a tag to compare

Changelog

Added

  • Conn.Barrier() API. This is an advance API that can be useful in some specific situations. Thanks to @nussjustin for reporting an issue during development of this feature (#338, #346)
  • ReconnectBufSize() option setter. Thanks to @ripienaar (#340)

Improved

  • Reduce memory usage during reconnect. Thanks to @charlievieth (#341)
  • No need for regex in Connect(). Thanks to @charlievieth (#342)
  • List of servers is now updated when the cluster topology changes. Will require server at version 1.0.7+ (#344, #352)

Fixed

  • Protocol(s) received right after initial PONG may be missed. This would manifest with the handling of cluster topology state on connect with server 1.0.7+ (#348)

Changed

  • Moved to Apache 2.0 License as part of the move to CNCF (#354)

Complete Changes

nats-io/go-nats@v1.4.0...v1.5.0

Release v1.4.0

20 Dec 19:16
d66cb54
Compare
Choose a tag to compare

Changelog

Added

  • CustomDialer interface and SetCustomDialer option setter. Thanks to @joyhope and @mdevan for the report (#334)

Improved

  • Reduce memory allocations for subscription protocol. Thanks to @nussjustin (#319)

Fixed

  • Possible repeated timeout of Flush/FlushTimeout and inability to dispatch (#322)
  • Some typos and unnecessary type conversion. Thanks to @marmotini (#324)
  • ErrorHandler not always reporting proper error (#326)
  • TLSConfig cloning for Go 1.8+. Thanks to @johanbrandhorst (#336)

Deprecated

  • Dialer option/setter, which deals with a *net.Dialer. Use CustomDialer instead (#334)

Complete Changes

nats-io/go-nats@v1.3.0...v1.4.0

Release v1.3.0

10 Aug 20:47
Compare
Choose a tag to compare

Changelog

Added

  • FlusherTimeout option to limit the time the flusher can block (#252)
  • DiscoveredServersCB connection handler invoked when a server joins the cluster (#282)
  • context.Context support with new APIs: RequestWithContext, NextMsgWithContext (#275)
  • GetDefaultOptions() produces new default Options. Should be used instead of DefaultOptions. Thanks to @nogoegst (#308)

Improved

  • Performance when connection publishes to itself and reduces risk of getting slow consumer (#285)
  • Less chatty request protocol (#295, #299)
  • Use of pool for timers in Request/NextMsg/FlushTimeout calls (#297)

Changed

  • Repo name (now go-nats) (#239)
  • Authorization errors now trigger the async error callback and do not close the connection (#300)

Fixed

  • Server pool shuffling when adding new URLs when servers join the cluster (#260)
  • Very rare panic in WaitGroup.Wait() (#268)
  • Locking in handling permission violation error from server (#289)

Deprecated

  • DefaultOptions. You should use GetDefaultOptions() instead. See #308

Complete Changes

nats-io/go-nats@v1.2.2...v1.3.0

Release v1.2.2

26 Oct 23:37
Compare
Choose a tag to compare

Changelog

Added

  • Support for cluster auto-discovery with servers v0.9.4+
  • Conn.IsConnected method to verify if client is connected
  • Conn.DiscoveredServers to get the list of servers discovered after initial connect
    to server part of a cluster (with servers v0.9.4+)
  • Custom Dialers for nats.Connect()
  • staticcheck in Travis build

Updated

  • README’s Clustered Usage section
  • Travis build with go 1.7.3

Removed

  • Travis build with go 1.5

Fixed

  • Use default connect timeout in opts.Connect() if none is specified
  • Chan subscribers could not receive more than 65536 messages
  • Allow message size of 0 in examples/nats-bench.go
  • Ensure message count is greater than 0 in examples/nats-bench.go
  • If Options.Url is set, ensure it is tried first on initial connect
  • Data race with Conn.LastError()
  • Warning from go 1.7.3 with TLS config copy

Complete Changes

v1.2.0...v1.2.2