Skip to content

Releases: nats-io/nats.c

v3.8.2

17 Apr 17:02
d58bb6b
Compare
Choose a tag to compare

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

28 Feb 18:35
86124c4
Compare
Choose a tag to compare

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

Full Changelog: v3.7.0...v3.8.0

Release v3.7.0

12 Oct 15:52
5d057f6
Compare
Choose a tag to compare

Changelog

Added

  • NATS Server V2.10 feature support #682, #679
    • Added Metadata to jsStreamConfig and jsConsumerConfig
    • Added Compression, FirstSeq, SubjectTransforms, ConsumerLimits to jsStreamConfig
    • Added SubjectTransforms to jsStreamSourceInfo
    • Added (multiple) jsConsumerConfig.FilterSubjects
  • 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

nats-io/nats.go@v3.6.1...v3.7.0

Release v3.6.1

07 Mar 20:34
66cec7f
Compare
Choose a tag to compare

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:
    • natsSubscription_Fetch() not honoring timeout. Thanks to @kino71 for the report (#634)

Complete Changes

v3.6.0...v3.6.1

Release v3.6.0

27 Jan 00:32
d832491
Compare
Choose a tag to compare

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)
  • 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

v3.5.0...v3.6.0

Release v3.5.0

07 Nov 21:22
03ada19
Compare
Choose a tag to compare

Changelog

Added

  • KeyValue:
    • kvStatus_Bytes() to return the size of the bucket (#595)
    • Support for Mirror and Sources (#608)
  • JetStream
    • Stream alternates in jsStreamInfo. See jsStreamInfo.Alternates and jsStreamAlternate structure definition (#611)

Changed

  • KeyValue:
    • Library will no longer try to update the underlying stream when invoking js_CreateKeyValue() (#612)

Complete Changes

v3.4.1...v3.5.0

Release v3.4.1

12 Oct 17:51
b26143d
Compare
Choose a tag to compare

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 a no_auth_user, the past behavior was leading to very hard issues to investigate. Thanks to @kino71 and @julio77it for the report (#603)

Complete Changes

v3.4.0...v3.4.1

Release v3.4.0

23 Sep 18:26
a1ce12b
Compare
Choose a tag to compare

Changelog

Added

  • JetStream:
    • Stream RePublish configuration (#546, #563)
    • jsConsumerConfig has now Replicas and MemoryStorage 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 new js_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 in jsConsumerConfig structure. Users can now select consumer names, even for ephemerals. When Name is specified, the creation of the consumer will be sent to a $JS.API subject that is new to server v2.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() and js_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() and js_ConsumerNames() to respectively get the list of consumer informations (jsConsumerInfo) and the consumer names for a given stream (#592)
    • DiscardNewPerSubject in jsStreamConfig structure. This requires server v2.9.1+ (#593)
  • 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 and natsSubscription_GetSubject. Thanks to @hided for the contribution (#565)

Changed

  • Build:
    • Changed const int to int for Count field in various lists since this was causing some build issues with C++ and the use of const was not really helping preventing issues. Thanks to @simontherry and @Kazmirchuk for the report/suggestion (#567)
  • JetStream:
    • Users can now use MaxWait from the jsPubOptions to cause an asynchronous published message to timeout and invoke either the existing jsPubAckErrHandler or new jsPubAckHandler (#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 and AckAll. The restriction at the library level has been lifted since NATS Server v2.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 to v2.9.0 (#588)
  • KeyValue:
    • KeyValue store backed streams will now be created with the AllowDirect boolean. If a KeyValue's stream has this property, the kvStore_Get API will use the js_DirectGetMsg API instead of js_GetMsg (#562)
  • 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:
    • Consumer configuration check that is made when calling js_Subscribe (or the like) and verifying that the existing consumer's configuration matches the one provided by the user (#564)
    • jsAccountInfo, jsAccountLimits and a new jsTier structure to account for tier limits in the account (#586)

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)
  • 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 explicit natsSubscription_Unsubscribe() or natsSubscription_Drain() (or connection drain) (#582)
  • 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

v3.3.0...v3.4.0

Release v3.3.0

15 Mar 21:13
8c36c16
Compare
Choose a tag to compare

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 to target_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)
    • jsConsumerConfigfields:MaxRequestBatch, MaxRequestExpiresfor pull options, andInactiveThreshold` for ephemerals (#515, #518)
    • natsMsg_NakWithDelay() to ask the server to redeliver this message after the given delay (#516)
    • BackOff and BackOffLen fields in jsConsumerConfig structure to define the redelivery timeline for a message (#516)
    • SubjectsFilter in jsOptions that gives the ability to get the list of subjects with field Subjects (of a new type jsStreamStateSubjects) in a returned jsStreamInfo's State field (#517)
    • NumSubjects in jsStreamState 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. Returns NATS_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:
    • The MaxAckPending is no longer set if not user-specified. The server will pick the default (#528)
    • Any message acknowledgment call (natsMsg_Ack(), etc..) will become synchronous if the given jsOptions has a non-zero Wait value (#516)
  • KeyValue:
    • kvStore_Purge() now accepts a pointer (possibly NULL) to the new structure kvPurgeOptions to configure how long to wait for the operation to complete. The Timeout field would have to be set (#524)
    • kvStore_PurgeDeletes() now accepts a pointer (possibly NULL) to the new structure kvPurgeOptions. The API will now, by default, keep the markers that are less than 30 minutes old. This can be changed with the field DeleteMarkersOlderThan of the new kvPurgeOptions 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:
  • JetStream:
    • Auto-ack callback ack handling (#493)
    • Do not send ACKs for js_AckNone subscriptions (#495)
    • Subscriptions using the > wildcard. Thanks to @BryceCao for the report (#503)
    • natsSubscription_Fetch() could take longer than the given timeout (#511)
  • KeyValue:
    • Support for JetStream prefix which is required for cross-account proper functionality (#510)
  • NUID:
    • Wrong object passed to sizeof when doing a memset. Thanks to @paoloteti for the contribution (#505)
  • 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

v3.2.0...v3.3.0

Release v3.2.0

11 Nov 20:56
dd52d0c
Compare
Choose a tag to compare

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:
    • A whole new set of APIs to create a KeyValue store object and put/get/delete keys from a bucket. For more information, see the note here (#484, #485)
  • 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 and js_EraseMsg new APIs to respectively delete or erase a message from a stream (#478)
    • Stream configuration new options Sealed, DenyDelete, DenyPurge and AllowRollup (#479)
    • js_GetMsg and js_GetLastMsg new APIs to retrieve a specific message, or the last message for a given subject, from a stream (#481)

Improved

  • JetStream:
    • No need to specify the subject in a js_Subscribe() call if options tell the API to bind to a specific stream/consumer. Thanks to @kino71 for the feedback (#475)

Updated

  • JetStream:
    • The js-pub.c and js-sub.c examples have been updated. The -subj (which defaults to foo) is now use as the list of subjects for the stream, and the js-sub.c program will now also try to create the memory stream if not found (#486)

Fixed

  • JetStream:

    • Flow control may possibly stall (#470)
    • API usage in README (#471)
    • Durable name cannot contain the . character. An error will now be returned (#474)
  • AutoUnsubscribe() should be like Unsubscribe() if the number of delivered messages is already higher than the auto-unsubscribe target (#467)

Complete Changes

v3.1.1...v3.2.0