nats-io/nats.go
### [`v1.17.0`](https://togithub.com/nats-io/nats.go/releases/tag/v1.17.0)
[Compare Source](https://togithub.com/nats-io/nats.go/compare/v1.16.0...v1.17.0)
#### Changelog
##### IMPORTANT
This release uses a new consumer create API when interacting with nats-server version 2.9.0 or higher. This changes the subjects used by the client to create consumers, which might in some cases require changes in access and import/export configuration. To opt out of this feature, use `UseLegacyDurableConsumers()` option when creating `JetStreamContext`.
##### Added
- JetStream:
- Support for enhanced stream purge. `PurgeStream()` now accepts `StreamPurgeRequest` as an option, allowing partial purge by subject sequence number or keeping selected number of messages ([#988](https://togithub.com/nats-io/nats.go/issues/988))
- Option to fetch `DeletedDetails` when fetching `StreamInfo`. `StreamInfo()` now accepts `StreamInfoRequest` allowing to pass `DeletedDetails` flag ([#990](https://togithub.com/nats-io/nats.go/issues/990))
- Option to report subjects on `StreamInfo()` request. `StreamInfo()` now accepts `StreamInfoRequest` allowing to pass `SubjectsFilter` value ([#1010](https://togithub.com/nats-io/nats.go/issues/1010))
- Support `AllowDirect` in stream configuration, enabling faster access to individual messages on a stream ([#991](https://togithub.com/nats-io/nats.go/issues/991))
- Support for `DirectGet` API in `GetMsg()` through `DirectGet()` and `DirectGetNext()` options ([#1020](https://togithub.com/nats-io/nats.go/issues/1020), [#1030](https://togithub.com/nats-io/nats.go/issues/1030))
- `HeadersOnly` option to `RePublish` field on stream configuration and change struct name to `RePublish` ([#991](https://togithub.com/nats-io/nats.go/issues/991))
- `SecureDeleteMsg()` method to securely delete and overwrite a message on a stream ([#1025](https://togithub.com/nats-io/nats.go/issues/1025))
- `MaxRequestMaxBytes()` `PullConsumer()` option allowing setting the maximum number of bytes a single `Fetch()`can receive ([#1043](https://togithub.com/nats-io/nats.go/issues/1043))
- Filter streams and stream names by subject in `StreamsInfo()` and `StreamNames()` using `StreamListFilter()` option ([#1062](https://togithub.com/nats-io/nats.go/issues/1062))
- Accept `AckAll` for pull consumers. Thanks to [@neilalexander](https://togithub.com/neilalexander) for the contribution ([#1063](https://togithub.com/nats-io/nats.go/issues/1063))
- Support for setting consumer replicas through `Subscribe()` options. Thanks to [@goku321](https://togithub.com/goku321) for the contribution ([#1019](https://togithub.com/nats-io/nats.go/issues/1019))
- Support for setting memory storage on consumer with `ConsumerMemoryStorage()` option in `Subscribe()`. Thanks to [@goku321](https://togithub.com/goku321) for the contribution ([#1078](https://togithub.com/nats-io/nats.go/issues/1078))
- KV:
- `RePublish` option on key value configuration ([#1031](https://togithub.com/nats-io/nats.go/issues/1031))
- ObjectStore:
- `ObjectStores()` and `ObjectStoreNames()` methods for listing object store buckets ([#1074](https://togithub.com/nats-io/nats.go/issues/1074))
- `TLSConnectionState()` to expose TLS connection state ([#996](https://togithub.com/nats-io/nats.go/issues/996))
- `UserJWTAndSeed` helper function accepting JWT and seed as parameters ([#1046](https://togithub.com/nats-io/nats.go/issues/1046))
- `natsProtoErr` type for proto error normalization and comparison using `errors.Is()` ([#1082](https://togithub.com/nats-io/nats.go/issues/1082))
##### Improved
- JetStream
- Add `JetStreamError` type for all JetStream related errors, containing error codes (for API errors). `JetStreamError` supports comparing and unwrapping errors using native `errors` package ([#1044](https://togithub.com/nats-io/nats.go/issues/1044), [#1047](https://togithub.com/nats-io/nats.go/issues/1047))
- Force `Subscribe()` to use memory storage and no replicas when using `OrderedConsumer()` ([#989](https://togithub.com/nats-io/nats.go/issues/989))
- Consistent error value of context timeout when using `Fetch()` on pull subscription. Thanks to [@wdhongtw](https://togithub.com/wdhongtw) for the contribution ([#1011](https://togithub.com/nats-io/nats.go/issues/1011))
- Add additional note to `PullSubscribe()` on durable semantics ([#994](https://togithub.com/nats-io/nats.go/issues/994))
- KV:
- Utilize `DirectGet()` in KV for improved performence ([#1020](https://togithub.com/nats-io/nats.go/issues/1020))
- Add support for reporting flusher errors. THanks to [@GeorgeEngland](https://togithub.com/GeorgeEngland) for the contribution ([#1015](https://togithub.com/nats-io/nats.go/issues/1015))
- Mention field defaults in `Options` struct documentation. Thanks to [@costela](https://togithub.com/costela) for the contribution ([#1013](https://togithub.com/nats-io/nats.go/issues/1013))
##### Changed
- JetStream:
- `DeleteMsg()` now uses `NoErase` option by default, not overwriting the message on stream (only marking it as deleted) ([#1025](https://togithub.com/nats-io/nats.go/issues/1025))
- `StreamInfo()` will now return all subjects when requested ([#1072](https://togithub.com/nats-io/nats.go/issues/1072))
##### Updated
- JetStream:
- \[BREAKING] Use new consumer create API when interacting with nats-server version 2.9.0 or higher. This changes the subjects used by the client to create consumers, which might in some cases require changes in access and import/export configuration. To opt out of this feature, use `UseLegacyDurableConsumers()` option when creating `JetStreamContext` ([#1080](https://togithub.com/nats-io/nats.go/issues/1080))
- Add missing fields to `AccountInfo` schema ([#1026](https://togithub.com/nats-io/nats.go/issues/1026))
- Align `StreamSourceInfo` schema with server ([#1039](https://togithub.com/nats-io/nats.go/issues/1039))
- Use nats-server 2.9.0 in tests ([#1073](https://togithub.com/nats-io/nats.go/issues/1073))
- Add new test TLS certs and run tests for go 1.18 in CI ([#1023](https://togithub.com/nats-io/nats.go/issues/1023), [#1055](https://togithub.com/nats-io/nats.go/issues/1055))
##### Fixed
- JetStream
- `Subscribe()` automatically sending ACK when `AckPolicyNone` is set ([#987](https://togithub.com/nats-io/nats.go/issues/987))
- Return error when attempting to ACK a message on a `AckNone` consumer ([#1032](https://togithub.com/nats-io/nats.go/issues/1032))
- Use native time.Time.Equal method for equality check when comparing consumer configs ([#993](https://togithub.com/nats-io/nats.go/issues/993))
- Ephemeral PullConsumer's Fetch() failing with "no responders" ([#1022](https://togithub.com/nats-io/nats.go/issues/1022))
- `ConsumerInfo` nil pointer dereference when `jsi` is not initialized. Thanks to [@Sergey-Belyakov](https://togithub.com/Sergey-Belyakov) for the contribution ([#1024](https://togithub.com/nats-io/nats.go/issues/1024))
- Paging in stream and consumer name listing ([#1060](https://togithub.com/nats-io/nats.go/issues/1060))
- ObjectStore
- Update object `Put()` to avoid loosing last chunk when `Reader` returns both value and `EOF`. Thanks to [@tinou98](https://togithub.com/tinou98) for the contribution ([#995](https://togithub.com/nats-io/nats.go/issues/995))
- Invalid digest decoding on object `Get()`, not propagating errors from `Get()` to the user ([#1052](https://togithub.com/nats-io/nats.go/issues/1052))
- Allow updating meta if new name exists but is deleted ([#1053](https://togithub.com/nats-io/nats.go/issues/1053))
- Disallow adding links in `Put()` object meta ([#1057](https://togithub.com/nats-io/nats.go/issues/1057))
- Typo in `CustomInboxPrefix()` error message. Thanks to [@subtle-byte](https://togithub.com/subtle-byte) for the contribution ([#1028](https://togithub.com/nats-io/nats.go/issues/1028))
- Ignore trailing comma at the end of URL lists ([#1058](https://togithub.com/nats-io/nats.go/issues/1058))
##### Complete Changes
### [`v1.16.0`](https://togithub.com/nats-io/nats.go/releases/tag/v1.16.0)
[Compare Source](https://togithub.com/nats-io/nats.go/compare/v1.15.0...v1.16.0)
#### Changelog
##### Added
- JetStream:
- **Experimental**: `StreamConfig.RePublish` configuration, which is a `SubjectMapping` (source/destination) which allows the republish of a message after being sequenced and stored ([#980](https://togithub.com/nats-io/nats.go/issues/980))
- **Experimental**: Two new `ConsumerConfig` fields: `Replicas` and `MemoryStorage` which are generally inherited by parent stream, but can be configured directly ([#980](https://togithub.com/nats-io/nats.go/issues/980))
- Websocket:
- `ProxyPath()` option to add a path to websocket connection URLs. Thanks to [@ido-gold-apolicy](https://togithub.com/ido-gold-apolicy) for the contribution ([#974](https://togithub.com/nats-io/nats.go/issues/974))
##### Complete Changes
Configuration
π Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
v1.15.0
->v1.17.0
Release Notes
nats-io/nats.go
### [`v1.17.0`](https://togithub.com/nats-io/nats.go/releases/tag/v1.17.0) [Compare Source](https://togithub.com/nats-io/nats.go/compare/v1.16.0...v1.17.0) #### Changelog ##### IMPORTANT This release uses a new consumer create API when interacting with nats-server version 2.9.0 or higher. This changes the subjects used by the client to create consumers, which might in some cases require changes in access and import/export configuration. To opt out of this feature, use `UseLegacyDurableConsumers()` option when creating `JetStreamContext`. ##### Added - JetStream: - Support for enhanced stream purge. `PurgeStream()` now accepts `StreamPurgeRequest` as an option, allowing partial purge by subject sequence number or keeping selected number of messages ([#988](https://togithub.com/nats-io/nats.go/issues/988)) - Option to fetch `DeletedDetails` when fetching `StreamInfo`. `StreamInfo()` now accepts `StreamInfoRequest` allowing to pass `DeletedDetails` flag ([#990](https://togithub.com/nats-io/nats.go/issues/990)) - Option to report subjects on `StreamInfo()` request. `StreamInfo()` now accepts `StreamInfoRequest` allowing to pass `SubjectsFilter` value ([#1010](https://togithub.com/nats-io/nats.go/issues/1010)) - Support `AllowDirect` in stream configuration, enabling faster access to individual messages on a stream ([#991](https://togithub.com/nats-io/nats.go/issues/991)) - Support for `DirectGet` API in `GetMsg()` through `DirectGet()` and `DirectGetNext()` options ([#1020](https://togithub.com/nats-io/nats.go/issues/1020), [#1030](https://togithub.com/nats-io/nats.go/issues/1030)) - `HeadersOnly` option to `RePublish` field on stream configuration and change struct name to `RePublish` ([#991](https://togithub.com/nats-io/nats.go/issues/991)) - `SecureDeleteMsg()` method to securely delete and overwrite a message on a stream ([#1025](https://togithub.com/nats-io/nats.go/issues/1025)) - `MaxRequestMaxBytes()` `PullConsumer()` option allowing setting the maximum number of bytes a single `Fetch()`can receive ([#1043](https://togithub.com/nats-io/nats.go/issues/1043)) - Filter streams and stream names by subject in `StreamsInfo()` and `StreamNames()` using `StreamListFilter()` option ([#1062](https://togithub.com/nats-io/nats.go/issues/1062)) - Accept `AckAll` for pull consumers. Thanks to [@neilalexander](https://togithub.com/neilalexander) for the contribution ([#1063](https://togithub.com/nats-io/nats.go/issues/1063)) - Support for setting consumer replicas through `Subscribe()` options. Thanks to [@goku321](https://togithub.com/goku321) for the contribution ([#1019](https://togithub.com/nats-io/nats.go/issues/1019)) - Support for setting memory storage on consumer with `ConsumerMemoryStorage()` option in `Subscribe()`. Thanks to [@goku321](https://togithub.com/goku321) for the contribution ([#1078](https://togithub.com/nats-io/nats.go/issues/1078)) - KV: - `RePublish` option on key value configuration ([#1031](https://togithub.com/nats-io/nats.go/issues/1031)) - ObjectStore: - `ObjectStores()` and `ObjectStoreNames()` methods for listing object store buckets ([#1074](https://togithub.com/nats-io/nats.go/issues/1074)) - `TLSConnectionState()` to expose TLS connection state ([#996](https://togithub.com/nats-io/nats.go/issues/996)) - `UserJWTAndSeed` helper function accepting JWT and seed as parameters ([#1046](https://togithub.com/nats-io/nats.go/issues/1046)) - `natsProtoErr` type for proto error normalization and comparison using `errors.Is()` ([#1082](https://togithub.com/nats-io/nats.go/issues/1082)) ##### Improved - JetStream - Add `JetStreamError` type for all JetStream related errors, containing error codes (for API errors). `JetStreamError` supports comparing and unwrapping errors using native `errors` package ([#1044](https://togithub.com/nats-io/nats.go/issues/1044), [#1047](https://togithub.com/nats-io/nats.go/issues/1047)) - Force `Subscribe()` to use memory storage and no replicas when using `OrderedConsumer()` ([#989](https://togithub.com/nats-io/nats.go/issues/989)) - Consistent error value of context timeout when using `Fetch()` on pull subscription. Thanks to [@wdhongtw](https://togithub.com/wdhongtw) for the contribution ([#1011](https://togithub.com/nats-io/nats.go/issues/1011)) - Add additional note to `PullSubscribe()` on durable semantics ([#994](https://togithub.com/nats-io/nats.go/issues/994)) - KV: - Utilize `DirectGet()` in KV for improved performence ([#1020](https://togithub.com/nats-io/nats.go/issues/1020)) - Add support for reporting flusher errors. THanks to [@GeorgeEngland](https://togithub.com/GeorgeEngland) for the contribution ([#1015](https://togithub.com/nats-io/nats.go/issues/1015)) - Mention field defaults in `Options` struct documentation. Thanks to [@costela](https://togithub.com/costela) for the contribution ([#1013](https://togithub.com/nats-io/nats.go/issues/1013)) ##### Changed - JetStream: - `DeleteMsg()` now uses `NoErase` option by default, not overwriting the message on stream (only marking it as deleted) ([#1025](https://togithub.com/nats-io/nats.go/issues/1025)) - `StreamInfo()` will now return all subjects when requested ([#1072](https://togithub.com/nats-io/nats.go/issues/1072)) ##### Updated - JetStream: - \[BREAKING] Use new consumer create API when interacting with nats-server version 2.9.0 or higher. This changes the subjects used by the client to create consumers, which might in some cases require changes in access and import/export configuration. To opt out of this feature, use `UseLegacyDurableConsumers()` option when creating `JetStreamContext` ([#1080](https://togithub.com/nats-io/nats.go/issues/1080)) - Add missing fields to `AccountInfo` schema ([#1026](https://togithub.com/nats-io/nats.go/issues/1026)) - Align `StreamSourceInfo` schema with server ([#1039](https://togithub.com/nats-io/nats.go/issues/1039)) - Use nats-server 2.9.0 in tests ([#1073](https://togithub.com/nats-io/nats.go/issues/1073)) - Add new test TLS certs and run tests for go 1.18 in CI ([#1023](https://togithub.com/nats-io/nats.go/issues/1023), [#1055](https://togithub.com/nats-io/nats.go/issues/1055)) ##### Fixed - JetStream - `Subscribe()` automatically sending ACK when `AckPolicyNone` is set ([#987](https://togithub.com/nats-io/nats.go/issues/987)) - Return error when attempting to ACK a message on a `AckNone` consumer ([#1032](https://togithub.com/nats-io/nats.go/issues/1032)) - Use native time.Time.Equal method for equality check when comparing consumer configs ([#993](https://togithub.com/nats-io/nats.go/issues/993)) - Ephemeral PullConsumer's Fetch() failing with "no responders" ([#1022](https://togithub.com/nats-io/nats.go/issues/1022)) - `ConsumerInfo` nil pointer dereference when `jsi` is not initialized. Thanks to [@Sergey-Belyakov](https://togithub.com/Sergey-Belyakov) for the contribution ([#1024](https://togithub.com/nats-io/nats.go/issues/1024)) - Paging in stream and consumer name listing ([#1060](https://togithub.com/nats-io/nats.go/issues/1060)) - ObjectStore - Update object `Put()` to avoid loosing last chunk when `Reader` returns both value and `EOF`. Thanks to [@tinou98](https://togithub.com/tinou98) for the contribution ([#995](https://togithub.com/nats-io/nats.go/issues/995)) - Invalid digest decoding on object `Get()`, not propagating errors from `Get()` to the user ([#1052](https://togithub.com/nats-io/nats.go/issues/1052)) - Allow updating meta if new name exists but is deleted ([#1053](https://togithub.com/nats-io/nats.go/issues/1053)) - Disallow adding links in `Put()` object meta ([#1057](https://togithub.com/nats-io/nats.go/issues/1057)) - Typo in `CustomInboxPrefix()` error message. Thanks to [@subtle-byte](https://togithub.com/subtle-byte) for the contribution ([#1028](https://togithub.com/nats-io/nats.go/issues/1028)) - Ignore trailing comma at the end of URL lists ([#1058](https://togithub.com/nats-io/nats.go/issues/1058)) ##### Complete Changes ### [`v1.16.0`](https://togithub.com/nats-io/nats.go/releases/tag/v1.16.0) [Compare Source](https://togithub.com/nats-io/nats.go/compare/v1.15.0...v1.16.0) #### Changelog ##### Added - JetStream: - **Experimental**: `StreamConfig.RePublish` configuration, which is a `SubjectMapping` (source/destination) which allows the republish of a message after being sequenced and stored ([#980](https://togithub.com/nats-io/nats.go/issues/980)) - **Experimental**: Two new `ConsumerConfig` fields: `Replicas` and `MemoryStorage` which are generally inherited by parent stream, but can be configured directly ([#980](https://togithub.com/nats-io/nats.go/issues/980)) - Websocket: - `ProxyPath()` option to add a path to websocket connection URLs. Thanks to [@ido-gold-apolicy](https://togithub.com/ido-gold-apolicy) for the contribution ([#974](https://togithub.com/nats-io/nats.go/issues/974)) ##### Complete ChangesConfiguration
π Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.