Golang client for NATS, the cloud native messaging system.
This release focuses on a set of changes and improvements in new JetStream API. With this release, JetStream API is out of preview.
Additionally, with this release support for go version < 1.18.0 is dropped, due to usage of any
type in codebase.
HeadersOnly
field on OrderedConsumerConfig
(#1327)WithStreamListSubject()
option to filter results of ListStreams()
and StreamNames()
by stream name (#1312)dev
and main
branches of nats-server
to tests in CI (#1336)parse_test.go
. Thanks @YukiBobier for the contribution (#1334)jetstream/README.md
(#1347, #1350)interface{}
with any
across the codebase (#1332)NakWithDelay
to separate method, instead of it being an option on Nak()
(#1337)context.Background()
or context.TODO()
is used (#1348)OrderedConsumer()
(#1317)Next()
blocking indefinitely after calling Stop()
. Thanks @mdawar for the contribution (#1344)Consume()
(#1345)PublishAsync()
blocking published due to PublishAsyncMaxPending
not being reset on reconnect (#1346)PublishAsync()
blocking published due to PublishAsyncMaxPending
not being reset on reconnect (#1346)https://github.com/nats-io/nats.go/compare/v1.27.1...v1.28.0
FetchBytes()
in jetstream/README.md
. Thanks @fabiant7t for the contribution! (#1329)nats.Conn
for pull requests. Thanks @oderwat for the contribution! (#1322)nats.Context
is used. Thanks @anthonyjacques20 for the contribution! (#1314)Durable
not set on server versions prior to 2.9.0 (#1325)https://github.com/nats-io/nats.go/compare/v1.27.0...v1.27.1
This release focuses on improvements to new JetStream API and Service API (micro
) preview functionalities.
StreamNameBySubject()
method for stream discovery based on provided subject (#1292)Consume()
and Messages()
(#1303)AddConsumer
to CreateOrUpdateConsumer
. This change is introduced in anticipation for separation of create and update operations in nats-server
(#1300)AckPolicy
to AckPolicyExplicit
(#1278)PullThresholdBytes
type name (#1300)ConsumerConfig
(#1300)context.Context
from PublishAsync
and PublishMsgAsync
(#1300)micro
):
INFO
schema (#1277)
STATS
response to INFO
responseINFO
now returns endpoints
object, containing subject, name and metatada. This replaces subject
field.ErrNoHeartbeat
. Thanks @alexisvisco for the contibution! (#1291)jetstream/README.md
). Thanks @bojanz for the contribution! (#1295)Put()
and PutBytes()
(#1282)https://github.com/nats-io/nats.go/compare/v1.26.0...v1.27.0
This release adds beta functionality of JetStream simplified API. The goal of this API is to simplify and streamline stream and consumer management, as well as leverage pull consumers for continuous message retrieval. We encourage you to give it a try and post your feedback!
You can find more details on the new API here
jetstream
directory (https://github.com/nats-io/nats.go/blob/main/jetstream/README.md) (#1273).ConsumerName()
subscribe option to set Name
in ConsumerConfig
when creating a consumer (#1263)SkipConsumerLookup()
subscribe option to bypass verifying if the consumer exists before consumer creation (#1265)micro
directory (#1271)micro
(#1240)Subscribe()
when name is not provided to leverage 2.9.0 consumer create server API (#1261, #1263)micro
):
api_url
and SCHEMA
endpoint (#1270)TestJetStreamConcurrentQueueDurablePushConsumers
test (#1267)https://github.com/nats-io/nats.go/compare/v1.25.0...v1.26.0
micro
):
TestJetStreamStreamInfoWithSubjectDetails
test (#1225)Durable()
option comment. Thanks @jlvallelonga fot the contribution (#1229)Fetch()
/FetchBatch()
. Additionaly, FetchBatch()
now
verifies whether a request timeout was received for a current pull request (#1237, #1238)https://github.com/nats-io/nats.go/compare/v1.24.0...v1.25.0
FetchChan
method to utilize non-blocking pull subscription requests (#1211)micro
):
ContextHandler
helper function which implements micro.Handler
and allows passing context.Context
to request handler (#1215)go.mod
and skip using deprecated rand.Seed
for go version +1.20 (#1209)micro
):
CreateKeyValue
idempotency check on AllowDirect
when upgrading server version to > 2.9.0 Thanks to @dbason for the contribution (#1213)https://github.com/nats-io/nats.go/compare/v1.23.0...v1.24.0
This release focuses on improvements in micro
package, most notably adding a possibility to create a service with multiple endpoints.
micro
):
type
field in monitoring handlers responses (#1173)AddConsumer()
performance by not sending JS request if consumer config has not changed (#1185)micro
):
micro.Request
(#1174)time.Time
instead of string
for Started
field in STATS
response (#1175)nats.Connect()
are missing before using them (#1181)go.mod
to 1.18 and update go version used by Travis (#1182)%w
) in various errors (#1182)nats.ReconnectBufSize()
(#1169)micro
package. Thanks to @chenjpu for the contribution (#1171)ConsumerInfo
call in AddConsumer()
(#1176)https://github.com/nats-io/nats.go/compare/v1.22.1...v1.23.0
RequestHandler
signature to no longer return an error (#1166)https://github.com/nats-io/nats.go/compare/v1.22.0...v1.22.1
This release adds a beta implementation of micro
package, which provides API for creating and monitoring microservices on top of NATS connection.
https://github.com/nats-io/nats.go/compare/v1.21.0...v1.22.0
ConnectHandler
connect option to detect that initial connection was established. This is especially useful when combined with RetryOnFailedConnect
(#1133 )IgnoreAuthErrorAbort
connect option to prevent aborting reconnect attempts after receiving the same authentication error twice (#1141)SkipTLSHandshake
option to CustomDialer
. SkipTLSHandshake
method can be implemented on a custom dialer to prevent TLS handshake if not needed (#1147)ErrKeyExists
error when attempting to Create()
a KV pair for an existing key (#1135, #1136)ErrLeadershipChanged
error, returned when consumer leadership has changed during a pull request on a consumer. Thanks to @sata-form3 for the contribution (#1151)io/ioutil
. Thanks to @cesarvspr for the contribution (#1150)https://github.com/nats-io/nats.go/compare/v1.20.0...v1.21.0