Skip to content

Release v2.2.0

Compare
Choose a tag to compare
@kozlovic kozlovic released this 29 Jul 22:19
938ddcd

Changelog

Added

  • natsSubscription_SetOnCompleteCB() and stanSubscription_SetOnCompleteCB() which allows users to set a callback that will be invoked when the subscription is closed and message handler has returned. Thanks to @pananton and @etrochim for the feedback (#303, #320)
  • CMake: a change that allows other applications to use this project directly with the find_package(). Thanks to @zlinwei for the contribution (#294)
  • natsConnection_GetClientIP() returns the IP as determined by the server when accepting this connection (#312)
  • natsConnection_GetRTT() returns the roundtrip time between the client and server (#315)
  • natsOptions_SetCipherSuites() to set ciphers for TLSv1.3 (#323)
  • natsOptions_SetReconnectJitter() and natsOptions_SetCustomReconnectDelay() options driving how long to wait before reconnect attempts (#326)
  • natsOptions_SetLameDuckModeCB() to be notified if the server enters lame duck mode (#336)
  • Headers support. See this section for more information (#351)
  • No responders support. When connected to a NATS Server v2.2.0+, if no responder is running when the request is sent, the library will be notified by the server and a new NATS_NO_RESPONDERS status code is returned to the natsConnection_Request() and the like calls (#353)

Changed

  • Use MSG_NOSIGNAL and SO_NOSIGPIPE to suppress SIGPIPE signals. Thanks to @rigtorp for the contribution (#277)
  • Use natsInbox type for natsInbox_Create() and natsInbox_Destroy(). Thanks to @paroga for the contribution (#281)
  • Reduce default flush timeout from 60 to 10 seconds (#316)

Updated

  • Increased the default max control line to 4096 (#313)

Improved

  • Constant correctness in the code. Thanks to @paroga for the contribution (#329)
  • Removed unused variables. Thanks to @pas2k for the contribution (#339, #340)

Fixed

  • Do not send partial protocols on reconnect. Thanks to @rigtorp for the report (#280)
  • Windows: exclude DllMain when building static library. Thanks to @emgre for the report (#285)
  • Libuv adapter: call process read event in natsLibuvPoll() when called with negative status. This will allow for proper reconnect. Thanks to @hubinix for the report (#291)
  • CMake: fail if required packages are not found or for incompatible configurations. Thanks to @rkuchumov for the report (#293, #295)
  • Failure to parse MSG protocols with extra spaces. Thanks to @uscorchr for the report (#305)
  • Doc: in README.md regarding outbound's buffer size that can be configured. Thanks to @OriKerer for the report (#307)
  • Randomization of discovered server URLs (#319)
  • Doc: natsOptions_SetDisconnectedCB() documentation regarding how many times this callback could be invoked. Thanks to @pananton for the report (#322)
  • Some memory alignment issues for ARM32. Thanks to @Gurah for the report and @rigtorp for the contribution (#324)
  • ErrorHandler not properly invoked for slow consumer cases. Thanks to @bogossdu92 for the report (#328)
  • Connection closed callback possibly invoked twice. Thanks to @pananton for the report (#333)
  • Streaming: Segmentation Fault if streaming connection was permanently lost (due to PINGs) but no ConnectionLost handler was set. Thanks to @cliffburdick for the report (#344)
  • Ensure a large timeout to natsConnection_FlushTimeout() does not overflow the wait time. Thanks to @pananto for the report (#346)
  • Connections with IP ordering and deadlines (#347)

Complete Changes

v2.1.0...v2.2.0