nats-go @ v1.14.0
integrity
- size
- 301.5 KiB
- downloaded
- last checked
- overlays
- go
- detected
- go module github.com/nats-io/nats.go
release notes
Changelog
JetStream and KeyValue users
Please see the "Changed" section for important (possibly breaking) changes compared to the previous version.
Experimental
The ObjectStore is still experimental and subject to change.
Added
- JetStream:
- Support for tracing API calls (#849, #911)
- Error
ErrMsgAlreadyAckdfor a more detailed error when trying to acknowledge a message that already was. Thanks to @Berreek for the contribution (#862) - Made
js.Subscribe()calls context aware (#872) UpdateConsumer()and new consumer configuration options:MaxRequestBatch,MaxRequestExpiresandInactiveThreshold(#893)NakWithDelay()new acknowledgment call, andBackOfflist of duration in theConsumerConfigobject (#894)BackOff()subscription option. Thanks to @mfaizanse for the contribution (#933)StallWait()publish option. This is the wait time (default is 200ms) that the library will wait when reaching the maximum inflight number of asynchronous publish calls (#941)
- KeyValue:
- Status functionality (#845)
MetaOnly()watcher option (#854)GetRevision()to get the key at a specific revision, orErrKeyNotFoundif the key does not exist or not at the expected revision. Thanks to @boxboatmatt for the contribution (#903)Placementin theKeyValueConfigstructure (#929)- Expose
nats.Context()option for thenats.KeyWatcherinterface. Thanks to @boxboatmatt for the contribution (#904)
- ObjectStore:
- Status functionality (#845)
Placementin theObjectStoreConfigstructure (#929)
ConnectedUrlRedacted()a redacted version ofConnectedUrl()(#923)
Changed
- JetStream:
- The library no longer sets a default
MaxAckPendingwhen creating a JetStream consumer onSubscribe(). The selection of the value is left for the server to pick (#920) - The library will now try to resend a message when getting a
ErrNoResponderserror on aPublish()orStreamInfo()call. This is to overcome "blips" that may happen during leader changes. The action will be retried up to 2 times with a 250ms wait in between. These can be changed with the new publish optionsRetryWait()andRetryAttempts()(#930) PublishMsgAsync()will now be limited to4,000maximum asynchronous publish calls inflight, if no maximum has been specified withPublishAsyncMaxPending()option.
- The library no longer sets a default
- KeyValue:
Delete()andPurge()now accept optionalDeleteOptoptions. The option available isLastRevision()which allows the purge or delete to be conditional to the last revision be equal to the last revision value, otherwise the operation will fail. Thanks to @steveh for the contribution (#856)PurgeDeletes()will now keep markers that are less than 30 minutes by default. Also,PurgeDeletes()now accepts optionalPurgeOptvalues, notWatchOpt. The newDeleteMarkersOlderThan()option can be provided to change the default 30 minutes. A negative value will remove markers, regardless of their age (#906)- When connecting to a
v2.7.2+server, the stream for the KeyValue should be created withDiscardNewinstead ofDiscardOld. The library will now automatically update an existing stream for a KeyValue fromDiscardOldtoDiscardNew(#917)
Improved
- Websocket:
- Use
80or443as default ports, depending on the schemews://orwss://. Thanks to @cbrake for the suggestion (#879)
- Use
- The connect failure error message when given an invalid user credentials file (#916)
- The library will now auto-reconnect when the connection is closed on maximum connections reached from server, which could happen after a configuration reload. The library would previously have caused the connection to be permanently closed (#935)
Updated
- Examples:
- The
Nats-echoservice example to simulate a status request (#950) - Comment for the demo servers. Removed the TLS specific version since one can connect with TLS or not to the same port (#952)
- The
Fixed
- Documentation:
- Typo in
Bindgo documentation. Thanks to @caspervonb for the contribution (#860) - Typo in
SetClosedHandler. Thanks to @tormoder for the contribution (#877) - Typo in example_test.go. Thanks to @bvwells for the contribution (#882)
- Comment for
Subscribemethod. Thanks to @ipromax for the contribution (#886) - Many API calls where not checking that stream and consumer names were valid, that is, did not contain a
.in their name. This resulted in situations where the API would timeout because the server did not have interest on the malformed subject. Thanks to @sata-form3 for the report (#947)
- Typo in
- JetStream:
- Ordered consumers handling of auto unsubscribe (#847)
- Activity check to handle cases when subscription was closed. Thanks to @boxboatmatt for the contribution (#873)
- Return
ErrStreamNotFoundwhen callingAddConsumeragainst a missing stream (#881) - Prefix the error returned by
StreamInfo()withnats:to matchConsumerInfo()(#928)
- KeyValue:
- Ensure
Get()returns anilandErrKeyNotFoundas per specification (#844) - Various issues, such as cancel of the context would not all the range on w.Updates() to exit, flow control, etc.. (#900, #901)
- Use of the
APIPrefixto work correctly across accounts (#910)
- Ensure
- Websocket:
- When using secure connection
wss://and a host name that resolves to multiple IPs, or when trying to reconnect to discovered servers, the (re)connection would fail withwebsocket invalid connection(#915) - Deadlock on authentication failure that manifested by a
Connect()hanging forever. Thanks to @wenerme for the report (#926)
- When using secure connection
Complete Changes
https://github.com/nats-io/nats.go/compare/v1.13.0...v1.14.0
download
unix · zip
curl -fL -o v1.14.0.zip https://ratatoskr.space/pkg/nats-go/v1.14.0.zip
printf '%s %s\n' '85da608fe3cae4d3ca7b8f0e81761f6f72f758191771904cdc12f6796cb52ebd' 'v1.14.0.zip' | sha256sum -c -
windows · zip
$url = "https://ratatoskr.space/pkg/nats-go/v1.14.0.zip"
$out = "v1.14.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "85da608fe3cae4d3ca7b8f0e81761f6f72f758191771904cdc12f6796cb52ebd") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o v1.14.0.tar.gz https://ratatoskr.space/pkg/nats-go/v1.14.0.tar.gz
printf '%s %s\n' 'd8cae8df8594eccb7fc92d67fca2f1bc1dd879af9fe279a7a7e1dd397e716810' 'v1.14.0.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "https://ratatoskr.space/pkg/nats-go/v1.14.0.tar.gz"
$out = "v1.14.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "d8cae8df8594eccb7fc92d67fca2f1bc1dd879af9fe279a7a7e1dd397e716810") { throw "sha256 mismatch" }
download via yggdrasil mesh
unix · zip
curl -fL -o v1.14.0.zip http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.14.0.zip
printf '%s %s\n' '85da608fe3cae4d3ca7b8f0e81761f6f72f758191771904cdc12f6796cb52ebd' 'v1.14.0.zip' | sha256sum -c -
windows · zip
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.14.0.zip"
$out = "v1.14.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "85da608fe3cae4d3ca7b8f0e81761f6f72f758191771904cdc12f6796cb52ebd") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o v1.14.0.tar.gz http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.14.0.tar.gz
printf '%s %s\n' 'd8cae8df8594eccb7fc92d67fca2f1bc1dd879af9fe279a7a7e1dd397e716810' 'v1.14.0.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.14.0.tar.gz"
$out = "v1.14.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "d8cae8df8594eccb7fc92d67fca2f1bc1dd879af9fe279a7a7e1dd397e716810") { throw "sha256 mismatch" }
| artifact | format | size | hashes |
|---|---|---|---|
| v1.14.0.zip | zip | 302.5 KiB |
blake3-24 92b4c2f5673ca59c0387f20739979057cf1e913c44323225
sha256 85da608fe3cae4d3ca7b8f0e81761f6f72f758191771904cdc12f6796cb52ebd
sha1 8797972af96cfada1df109a8a74ea15b90a5c2ad
|
| v1.14.0.tar.gz | tar.gz | 248.9 KiB |
blake3-24 1baee6e76a21e4222ce18d27a714ae08f731b3a76f80b2ea
sha256 d8cae8df8594eccb7fc92d67fca2f1bc1dd879af9fe279a7a7e1dd397e716810
sha1 25782b4483f53f191baa87b2894a0c5b5eaff5f2
|
go module archive
module zip with the module path rewritten to this mirror; fetched by go get through the
GOPROXY route
| artifact | format | size | hashes |
|---|---|---|---|
| v1.14.0.zip | zip | 304.6 KiB |
blake3-24 e302eab6a561663670a1bb24f8a0b8ed8702111f46d92de2
sha256 288a41445895473547e5b3e982c62db7178cb1e7e12ca3f386beb4d103a5b4a6
sha1 3394417cd48539e8b63af344027c903c145f625e
|
install
bazel
http_archive(
name = "nats-go",
urls = ["https://ratatoskr.space/pkg/nats-go/v1.14.0.tar.gz"],
integrity = "sha256-2Mro34WU7Mt/yS1n/KLxvB3Yea+f4nmnp+HdOX5xaBA=",
strip_prefix = "nats-go-v1.14.0",
)
zig
.url = "https://ratatoskr.space/pkg/nats-go/v1.14.0.tar.gz",
go
GOPROXY=https://ratatoskr.space GOSUMDB=off go get ratatoskr.space/pkg/nats-go@v1.14.0
install via yggdrasil mesh
bazel
http_archive(
name = "nats-go",
urls = ["http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.14.0.tar.gz"],
integrity = "sha256-2Mro34WU7Mt/yS1n/KLxvB3Yea+f4nmnp+HdOX5xaBA=",
strip_prefix = "nats-go-v1.14.0",
)
zig
.url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.14.0.tar.gz",
go
GOPROXY=http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg GOSUMDB=off GOINSECURE=14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/* go get 14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go@v1.14.0