NATS Go Client v1.8.0 Release Notes

Release Date: 2019-06-04 // almost 5 years ago
  • ๐Ÿ”„ 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.
    • 0๏ธโƒฃ 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