nats-go @ v1.12.0
integrity
- size
- 262.2 KiB
- downloaded
- last checked
- overlays
- go
- detected
- go module github.com/nats-io/nats.go
release notes
Changelog
Breaking Changes
This release has some important and breaking changes for the JetStream module. Previously, it was possible to create multiple instances of non queue subscriptions to the same JetStream consumer, which was wrong since each instance would get a copy of the same message and one instance acknowledging a message would mean that the other instance's message acknowledgement (or lack thereof) would be ignored. It was also possible to create queue groups against a JetStream consumer that was used by a non queue subscription.
This update requires the upcoming server version v2.4.0 to behave correctly, that is, the library will reject a "plain" subscription on a JetStream consumer that is already bound (that is, there is already an instance actively consuming from it), or on a consumer that was created for a queue group. It will also reject a queue subscription on a JetStream consumer that was not created for a queue group, or to a consumer that has been created for a different queue group. But it means that this update will not be able to create a queue subscription on a server pre v2.4.0 because those server do not have the concept of DeliverGroup in the consumer configuration.
Look at the Changed section below for the list of those changes.
The repository master branch has been renamed main. If you have a fork or a clone of the repository, you should run those git commands:
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
Added
- JetStream:
Bind()andBindStream()options to the subscribe calls (#740)ChanQueueSubscribe()(#744)APIPrefix()andDomain()options to specify prefix or domain. Thanks to @Jarema for the contribution (#750, #753)- Two new sentinel errors:
ErrStreamNotFoundandErrConsumerNotFound. Thanks to @actatum for the contribution (#760) MaxMsgsPerSubjectoption in theStreamConfig(#768)OrderedConsumer()subscription option to create a FIFO ephemeral consumer for in order delivery of messages. There are no redelivered and no ACKs, and flow control and heartbeats will be added but be taken care of without additional user code (#789, #793)DeliverSubject()option to configure the deliver subject of a JetStream consumer created by thejs.Subscribe()call (and variants) (#794)- Fields
DeliverGroupinConsumerConfig,PushBoundinConsumerInfo. They help making prevent incorrect subscriptions to JetStream consumers (#794) - Field
DescriptioninStreamConfigandConsumerConfig(#795) ExpectLastSequencePerSubject()publish option (#797)DeliverLastPerSubject()subscribe option (#798)
CustomInboxPrefixconnection option to set the custom prefix instead of_INBOX.(#767)
Changed
- JetStream:
Conn.JetStream()no longer looks up account information (#739)- With a
PullSubscription, callingNextMsg()orNextMsgWithContext()will now returnErrTypeSubscription. You must use theFetch()API (#794) - If the library created internally a JetStream consumer, the consumer will be deleted on
Unsubscribe()or when theDrain()completes (#794) - Fail multiple instances of a subscription on the same durable push consumer (only one active at a time). Also, consumers now have the concept of
DeliverGroup, which is the queue group name they are created for. Only queue members from the same group can attach to this consumer, and a non queue subscription cannot attach to it. Note that this requires server v2.4.0 (#794) - Attempting to create a queue subscription with a consumer configuration that has idle heartbeats and/or flow control will now result in an error (#794)
ConsumerInfo's fieldsDeliveredandAckFloorare nowSequenceInfoobjects that include the last activity (in UTC time) (#802)
Improved
- Avoid unnecessary data copy in some situations. Thanks to @Endeavourken for the contribution (#788)
- JetStream:
js.PullSubscribe()implementation that reduces the number of internal subscriptions being created/auto-unsubscribed (#791)- Subscribe calls will now return an error if the consumer configuration specified does not match the current consumer's configuration. Thanks to @kszafran for the suggestion (#803)
Fixed
- JetStream:
- Possible lock inversion (#794)
- JetStream consumers could be incorrectly deleted on subscription's
Unsubscribe()(#794)
- Removed unused code. Thanks to @rutgerbrf for the contribution (#737)
- Misspells in go doc. Thanks to @dtest11 for the contributions (#758, #759)
- Websocket:
- Decompression of continuation frames (#755)
Complete Changes
https://github.com/nats-io/nats.go/compare/v1.11.0...v1.12.0
download
curl -fL -o v1.12.0.zip https://ratatoskr.space/pkg/nats-go/v1.12.0.zip
printf '%s %s\n' '7dbf7c9cf4473ea7ad6784b958e4a01732f7e4f2b37a08b0ad29b21d92104d4b' 'v1.12.0.zip' | sha256sum -c -
$url = "https://ratatoskr.space/pkg/nats-go/v1.12.0.zip"
$out = "v1.12.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "7dbf7c9cf4473ea7ad6784b958e4a01732f7e4f2b37a08b0ad29b21d92104d4b") { throw "sha256 mismatch" }
curl -fL -o v1.12.0.tar.gz https://ratatoskr.space/pkg/nats-go/v1.12.0.tar.gz
printf '%s %s\n' 'd196b650c6de0d46f010ff7fd51fd0b3ee0992b4cc5db6f9217bd4171b53a4be' 'v1.12.0.tar.gz' | sha256sum -c -
$url = "https://ratatoskr.space/pkg/nats-go/v1.12.0.tar.gz"
$out = "v1.12.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "d196b650c6de0d46f010ff7fd51fd0b3ee0992b4cc5db6f9217bd4171b53a4be") { throw "sha256 mismatch" }
download via yggdrasil mesh
curl -fL -o v1.12.0.zip http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.12.0.zip
printf '%s %s\n' '7dbf7c9cf4473ea7ad6784b958e4a01732f7e4f2b37a08b0ad29b21d92104d4b' 'v1.12.0.zip' | sha256sum -c -
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.12.0.zip"
$out = "v1.12.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "7dbf7c9cf4473ea7ad6784b958e4a01732f7e4f2b37a08b0ad29b21d92104d4b") { throw "sha256 mismatch" }
curl -fL -o v1.12.0.tar.gz http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.12.0.tar.gz
printf '%s %s\n' 'd196b650c6de0d46f010ff7fd51fd0b3ee0992b4cc5db6f9217bd4171b53a4be' 'v1.12.0.tar.gz' | sha256sum -c -
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.12.0.tar.gz"
$out = "v1.12.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "d196b650c6de0d46f010ff7fd51fd0b3ee0992b4cc5db6f9217bd4171b53a4be") { throw "sha256 mismatch" }
| artifact | format | size | hashes |
|---|---|---|---|
| v1.12.0.zip | zip | 262.8 KiB |
blake3-24 c041338538b86e18fabb6a2b2c0ca4e9155f2199698e884d
sha256 7dbf7c9cf4473ea7ad6784b958e4a01732f7e4f2b37a08b0ad29b21d92104d4b
sha1 b1a89433ae8ddcf4b1d7fa47c56ea7b8df6e1fda
|
| v1.12.0.tar.gz | tar.gz | 214.7 KiB |
blake3-24 f8db01e558daae778db466183562d85d89befe11309f5d1f
sha256 d196b650c6de0d46f010ff7fd51fd0b3ee0992b4cc5db6f9217bd4171b53a4be
sha1 22e90881caebce6badf3c463763f95c4d08c2831
|
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.12.0.zip | zip | 264.7 KiB |
blake3-24 ae1368796a953fdd950b1e4ca53abb90f0d76cd3f528534f
sha256 dc9eb564107a7dca4892cb0c9b7daa82597c71179572d24b1ed68564f79ec589
sha1 c03be498060b4d756d6c9f1d67b5c2666f166657
|
install
http_archive(
name = "nats-go",
urls = ["https://ratatoskr.space/pkg/nats-go/v1.12.0.tar.gz"],
integrity = "sha256-0Za2UMbeDUbwEP9/1R/Qs+4JkrTMXbb5IXvUFxtTpL4=",
strip_prefix = "nats-go-v1.12.0",
)
.url = "https://ratatoskr.space/pkg/nats-go/v1.12.0.tar.gz",
GOPROXY=https://ratatoskr.space GOSUMDB=off go get ratatoskr.space/pkg/nats-go@v1.12.0
install via yggdrasil mesh
http_archive(
name = "nats-go",
urls = ["http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.12.0.tar.gz"],
integrity = "sha256-0Za2UMbeDUbwEP9/1R/Qs+4JkrTMXbb5IXvUFxtTpL4=",
strip_prefix = "nats-go-v1.12.0",
)
.url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.12.0.tar.gz",
GOPROXY=http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg GOSUMDB=off GOINSECURE=14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/* go get 14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go@v1.12.0