Releases: nats-io/nats.c
Releases · nats-io/nats.c
v3.8.2
Fixed
- Moved micro_args to examples by @levb in #731
- [FIXED] Build: issue on Android with NATS_EXTRA_LIB by @kozlovic in #739
- [FIXED] GH-786, do not prefix endpoint name with the group prefix by @levb in #741
- [FIXED] GH-736: added extern to micro_Errors by @levb in #743
Full Changelog: v3.8.0...v3.8.2
v3.8.0
Added
Fixed
- nuid: use unsigned intermediate to avoid left shift undefined behavior by @torque in #686
- Resolve a linking error related to outdated functions in the OpenSSL library by @davidhov in #681
- Fix link to Homebrew formula by @methvind in #703
- [FIXED] natsConnection_Connect can get stuck and consume all memory by @kozlovic in #707
- [FIXED] Random authentication error due to missing signature by @tyler92 in #705
- [FIXED] Build: Centos issue with pthread by @kozlovic in #710
- [FIXED] Missing NATS_EXTERN in nats.h for some functions. by @kozlovic in #715
Non-code changes
- [CHANGED] Updated dependencies.md by @levb in #685
- Simplify and relax issue forms further by @bruth in #688
- [CHANGED] Updated maintainers.md by @levb in #687
- Fix dependencies formatting by @Jarema in #689
- Disable a Travis-ci matrix run until Ubuntu bug resolved by @kozlovic in #708
- Fixed download of NATS Server for latest/main by @kozlovic in #711
New Contributors
- @torque made their first contribution in #686
- @davidhov made their first contribution in #681
- @biot2 made their first contribution in #694
- @Jarema made their first contribution in #689
- @methvind made their first contribution in #703
- @tyler92 made their first contribution in #705
Full Changelog: v3.7.0...v3.8.0
Release v3.7.0
Changelog
Added
- NATS Server V2.10 feature support #682, #679
- Added
Metadata
tojsStreamConfig
andjsConsumerConfig
- Added
Compression
,FirstSeq
,SubjectTransforms
,ConsumerLimits
tojsStreamConfig
- Added
SubjectTransforms
tojsStreamSourceInfo
- Added (multiple)
jsConsumerConfig.FilterSubjects
- Added
- NATS Microservice framework #640
Fixed
- Possible crash in async error handler if subscription was destroyed #659
- Missing connection status check causing unexpected delay during connection close #654 (thx @kolomenkin)
- nit: conn.c: _doReconnect: remove redundant assignment #651 (thx @kolomenkin)
- natsConnection_Buffered: fix returned value in case of error #650 (thx @kolomenkin)
- natsConnection_RequestMsg() incorrectly returns NATS_NO_SERVER_SUPPORT #645
- Test fixes #655, #643
Complete Changes
Release v3.6.1
Changelog
Fixed
- Bytes accounting while reading the INFO protocol. Thanks to @dmitrmax for the contribution (#632)
natsConnection_GetConnectedUrl()
not working during reconnect. Thanks to @Kazmirchuk for the report (#636)- Crash processing inbound message for destroyed subscription. Thanks to @fran6co for the report (#638)
- JetStream:
Complete Changes
Release v3.6.0
Changelog
Changed
- Build
- Deprecated
NATS_BUILD_TLS_USE_OPENSSL_1_1_API
CMake variable. From a fresh CMake build environment, the build will now assume building against OpenSSL 1.1+ (assuming building with TLS is not disabled). Thanks to @wolfkor for the feedback (#617) - Removed git submodule cmake-coveralls since it was causing Travis' "Log Scans" reports (#629)
- Deprecated
- Every connection will now have a default connection error handler (if none is set by the user) that prints the error on
stderr
(#625)
Added
natsOptions_SetUserCredentialsFromMemory
option to set the user JWT from memory instead of files. Thanks to @MichaelVoelkel for the contribution (#621)natsOptions_SetMessageBufferPadding
that adds padding when allocating buffer for incoming messages. Thanks to @dmitrmax for the contribution (#624)
Fixed
- Use
unsigned char
for<ctype.h>
functions where appropriate. Thanks to @sebhub for the contribution (#627)
Complete Changes
Release v3.5.0
Release v3.4.1
Changelog
Fixed
- JetStream:
- Removed unnecessary
ifdef
in_makeTLSConn
. Thanks to @npes87184 for the contribution (#597) - The library would reconnect to an implicit NATS Server (one that is discovered with gossip protocol) without using the user's provided username/password present in the server URL(s). The option
natsOptions_SetUserInfo()
was normally recommended for that case, but with the server ability to be configured with ano_auth_user
, the past behavior was leading to very hard issues to investigate. Thanks to @kino71 and @julio77it for the report (#603)
Complete Changes
Release v3.4.0
Changelog
Added
- JetStream:
- Stream
RePublish
configuration (#546, #563) jsConsumerConfig
has nowReplicas
andMemoryStorage
fields that can be used to changed the value that is normally inherited from the stream (#546)jsPubAckHandler
to handle "positive" asynchronous publish acknowledgments. Thanks to @pramodsri for the suggestion (#538)AllowDirect
stream configuration that then allows the use of a newjs_DirectGetMsg
API to be able to retrieve a message from a distributed queue group of servers (leader+replicas) (#562, #571, #576, #577, #579)- Support for ephemeral pull subscriptions, by omitting the durable name in the
js_PullSubscribe()
call (#578) Name
injsConsumerConfig
structure. Users can now select consumer names, even for ephemerals. WhenName
is specified, the creation of the consumer will be sent to a$JS.API
subject that is new to serverv2.9.0
and allows for the stream and consumer name (and possibly filter subject) to be part of the subject and can be protected with permissions (#580)natsSubscription_FetchRequest()
which allows the user to fully configure a pull subscription fetch request (#584)js_Streams()
andjs_StreamNames()
to respectively get the list of stream informations (jsStreamInfo
) and the stream names. The optional subject filter can be provided to limit to streams matching this filter (#591)js_Consumers()
andjs_ConsumerNames()
to respectively get the list of consumer informations (jsConsumerInfo
) and the consumer names for a given stream (#592)DiscardNewPerSubject
injsStreamConfig
structure. This requires serverv2.9.1+
(#593)
- Stream
- KeyValue:
RePublish
configuration (#570)
natsOptions_SetIgnoreDiscoveredServers
to ignore gossiped server URLs. The library will be able to reconnect only to the user-given list of servers (#552)natsSubscription_GetID
andnatsSubscription_GetSubject
. Thanks to @hided for the contribution (#565)
Changed
- Build:
- Changed
const int
toint
forCount
field in various lists since this was causing some build issues with C++ and the use ofconst
was not really helping preventing issues. Thanks to @simontherry and @Kazmirchuk for the report/suggestion (#567)
- Changed
- JetStream:
- Users can now use
MaxWait
from thejsPubOptions
to cause an asynchronous published message to timeout and invoke either the existingjsPubAckErrHandler
or newjsPubAckHandler
(#538) - Durable/Consumer names check to reject
.
,*
and>
since could cause issues since names may be part of the$JS.API
subject requests are sent on (#585) - Pull consumer can now user
AckNone
andAckAll
. The restriction at the library level has been lifted since NATS Serverv2.9.0+
accepts them now (#587) js_GetStreamInfo()
, when a subject filter is specified, will now return all subjects for this stream, and not be limited to the 100,000 limit that the server had prior tov2.9.0
(#588)
- Users can now use
- KeyValue:
- KeyValue store backed streams will now be created with the
AllowDirect
boolean. If a KeyValue's stream has this property, thekvStore_Get
API will use thejs_DirectGetMsg
API instead ofjs_GetMsg
(#562)
- KeyValue store backed streams will now be created with the
- Count message headers towards subscription limits (#583)
Improved
- Suppress unneeded UNSUB protocol on subscription destroy when delivered messages reached the auto-unsubscribe value. Thanks to @Kazmirchuk for the report (#560)
Updated
- JetStream:
Fixed
- Build:
- Failure to build on armel due to use of
yield
. Thanks to @linuxmaniac for the contribution (#556) - Compiler warning for internal
nats_JSONGetTime
function (#557)
- Failure to build on armel due to use of
- JetStream:
- Stream and consumer name checks: APIs need to reject names that contain a
.
(#537) natsSubscription_Destroy
should not have destroyed JetStream consumers if they were created by the library. This was supposed to be done only on explicitnatsSubscription_Unsubscribe()
ornatsSubscription_Drain()
(or connection drain) (#582)
- Stream and consumer name checks: APIs need to reject names that contain a
- KeyValue:
- Set watcher internal subscription limits to "unlimited" to prevent "slow consumer" errors that would cause messages to be dropped (#559)
- Handling of JSON's empty arrays (#590)
Complete Changes
Release v3.3.0
Changelog
The KeyValue APIs are still considered EXPERIMENTAL and we reserve the right to change them (based on usage and community feedback) without necessarily bumping the major version.
Added
- Build:
- Allow option to statically link OpenSSL libraries (see README.md for details). Thanks to @xiaoxiyouran for the suggestion (#491)
BUILD_INTERFACE
totarget_include_directories
. Thanks to @joejustesen for the contribution (#496)- List of known package managers. Thanks to @Jaegermeiste for the suggestion (#534)
- JetStream:
js_UpdateConsumer()
to be able to update a consumer (#515)- jsConsumerConfig
fields:
MaxRequestBatch,
MaxRequestExpiresfor pull options, and
InactiveThreshold` for ephemerals (#515, #518) natsMsg_NakWithDelay()
to ask the server to redeliver this message after the given delay (#516)BackOff
andBackOffLen
fields injsConsumerConfig
structure to define the redelivery timeline for a message (#516)SubjectsFilter
injsOptions
that gives the ability to get the list of subjects with fieldSubjects
(of a new typejsStreamStateSubjects
) in a returnedjsStreamInfo
'sState
field (#517)NumSubjects
injsStreamState
that indicates the number of distinct subjects in a given stream (#517)
- KeyValue:
kvStore_GetRevision()
to be able to get a key at a specific revision. ReturnsNATS_NOT_FOUND
if no entry exists for this key at this revision (#522)
- Options:
natsOptions_SetCustomInboxPrefix()
to be able to set a custom inbox prefix (#512)
Improved
- Crypto:
- Effectively zeroing memory content. Thanks to @paoloteti for the contribution (#501)
Changed
- JetStream:
- KeyValue:
kvStore_Purge()
now accepts a pointer (possiblyNULL
) to the new structurekvPurgeOptions
to configure how long to wait for the operation to complete. TheTimeout
field would have to be set (#524)kvStore_PurgeDeletes()
now accepts a pointer (possiblyNULL
) to the new structurekvPurgeOptions
. The API will now, by default, keep the markers that are less than 30 minutes old. This can be changed with the fieldDeleteMarkersOlderThan
of the newkvPurgeOptions
structure (#524)js_CreateKeyValue()
will update the underlying's stream discard policy if connecting to a server v2.7.2+. The discard policy starting at this release should be discard "new" instead of "old" (#535)
- TLS:
natsOptions_SetCertificatesChain()
is no longer limited to RSA key. Thanks to @thierryba for the suggestion (#527)
Fixed
- Build:
- GCC warning on format strings. Thanks to @paoloteti for the contribution (#497)
- CMake files install path. Thanks to @linuxmaniac for the contribution (#525)
- Documentation:
- Field
Consumer
in thejsSubOptions
structure. Thanks to @Martin-Robinson-Mar-1 for the report (#520)
- Field
- JetStream:
- KeyValue:
- Support for JetStream prefix which is required for cross-account proper functionality (#510)
- NUID:
- Wrong object passed to
sizeof
when doing amemset
. Thanks to @paoloteti for the contribution (#505)
- Wrong object passed to
- Code cleanup. Thanks to @yuchenlin and @ paoloteti for the contributions (#507, #508)
- Connection fails if URL is missing port. Thanks to @BryceCao for the report (#531)
Complete Changes
Release v3.2.0
Changelog
This release introduces KeyValue APIs. The APIs are considered EXPERIMENTAL and we reserve the right to change them (based on usage and community feedback) without necessarily bumping the major version.
Added
- KeyValue:
- JetStream:
- Ordered consumers are created with the new
jsSubOptions.Ordered
option. Ordered consumers are FIFO ephemeral consumers that offer ordered delivery of messages to the application. The library handles gap detections and recreation of internal subscription to ensure this orderly delivery so that application does not have to worry about that (#468) - Ability to receive messages with headers only, no payload. This is achieved with the new
jsConsumerConfig.HeadersOnly
option (#476) js_DeleteMsg
andjs_EraseMsg
new APIs to respectively delete or erase a message from a stream (#478)- Stream configuration new options
Sealed
,DenyDelete
,DenyPurge
andAllowRollup
(#479) js_GetMsg
andjs_GetLastMsg
new APIs to retrieve a specific message, or the last message for a given subject, from a stream (#481)
- Ordered consumers are created with the new
Improved
- JetStream:
Updated
- JetStream:
- The
js-pub.c
andjs-sub.c
examples have been updated. The-subj
(which defaults tofoo
) is now use as the list of subjects for the stream, and thejs-sub.c
program will now also try to create the memory stream if not found (#486)
- The
Fixed
-
JetStream:
-
AutoUnsubscribe()
should be likeUnsubscribe()
if the number of delivered messages is already higher than the auto-unsubscribe target (#467)