diff --git a/CMakeLists.txt b/CMakeLists.txt
index 414fe7a1..374b1c5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -235,7 +235,7 @@ endif(NATS_BUILD_WITH_TLS)
set(NATS_VERSION_MAJOR 3)
set(NATS_VERSION_MINOR 0)
set(NATS_VERSION_PATCH 0)
-set(NATS_VERSION_SUFFIX "-beta")
+set(NATS_VERSION_SUFFIX "")
set(NATS_VERSION_REQUIRED_NUMBER 0x030000)
diff --git a/README.md b/README.md
index 91486d7c..61c32688 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ This NATS Client implementation is heavily based on the [NATS GO Client](https:/
[![License Apache 2](https://img.shields.io/badge/License-Apache2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Build Status](https://travis-ci.com/nats-io/nats.c.svg?branch=main)](https://travis-ci.com/github/nats-io/nats.c)
[![Coverage Status](https://coveralls.io/repos/github/nats-io/nats.c/badge.svg?branch=main)](https://coveralls.io/github/nats-io/nats.c?branch=main)
-[![Release](https://img.shields.io/badge/release-v2.6.0-blue.svg?style=flat)](https://github.com/nats-io/nats.c/releases/tag/v2.6.0)
+[![Release](https://img.shields.io/badge/release-v3.0.0-blue.svg?style=flat)](https://github.com/nats-io/nats.c/releases/tag/v3.0.0)
[![Documentation](https://img.shields.io/badge/doc-Doxygen-brightgreen.svg?style=flat)](http://nats-io.github.io/nats.c)
[![Total alerts](https://img.shields.io/lgtm/alerts/g/nats-io/nats.c.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/nats-io/nats.c/alerts/)
[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/nats-io/nats.c.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/nats-io/nats.c/context:cpp)
@@ -425,7 +425,8 @@ onMsg(natsConnection *nc, natsSubscription *sub, natsMsg *msg, void *closure)
## JetStream
Support for JetStream starts with the version `v3.0.0` of the library and NATS Server `v2.2.0+`, although getting JetStream
-specific error codes requires the server at version `v2.3.0+`.
+specific error codes requires the server at version `v2.3.0+`. Some of the configuration options are only available starting `v2.3.3`,
+so we recommend that you use the latest NATS Server release to have a better experience.
Look at examples named `js-xxx.c` in the `examples` directory for examples on how to use the API.
The new objects and APIs are full documented in the online [documentation](http://nats-io.github.io/nats.c/group__js_group.html).
diff --git a/doc/DoxyFile.NATS.Client b/doc/DoxyFile.NATS.Client
index 09339aed..0957d398 100644
--- a/doc/DoxyFile.NATS.Client
+++ b/doc/DoxyFile.NATS.Client
@@ -38,7 +38,7 @@ PROJECT_NAME = "NATS C Client with JetStream and Streaming support"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 3.0.0-beta
+PROJECT_NUMBER = 3.0.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/doc/html/annotated.html b/doc/html/annotated.html
new file mode 100644
index 00000000..88e5d1c0
--- /dev/null
+++ b/doc/html/annotated.html
@@ -0,0 +1,134 @@
+
+
+
+
+
+
+
+NATS C Client with JetStream and Streaming support: Class List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
+
+
The nats.io C Client, Supported by Synadia Communications Inc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
NATS.IO Supported By Synadia Communications Inc.
+
+
+
+
+
+
diff --git a/doc/html/deprecated.html b/doc/html/deprecated.html
index ad6dd270..461b6822 100644
--- a/doc/html/deprecated.html
+++ b/doc/html/deprecated.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Deprecated List
+NATS C Client with JetStream and Streaming support: Deprecated List
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/dir_085924db4bed469054a9264cf96b0d5e.html b/doc/html/dir_085924db4bed469054a9264cf96b0d5e.html
index 817cc598..de727091 100644
--- a/doc/html/dir_085924db4bed469054a9264cf96b0d5e.html
+++ b/doc/html/dir_085924db4bed469054a9264cf96b0d5e.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: adapters Directory Reference
+NATS C Client with JetStream and Streaming support: adapters Directory Reference
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html
index d1cbd212..01c7dfd9 100644
--- a/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html
+++ b/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: src Directory Reference
+NATS C Client with JetStream and Streaming support: src Directory Reference
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/files.html b/doc/html/files.html
index 78124ea9..11a8697d 100644
--- a/doc/html/files.html
+++ b/doc/html/files.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: File List
+NATS C Client with JetStream and Streaming support: File List
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/functions.html b/doc/html/functions.html
new file mode 100644
index 00000000..f24b54a1
--- /dev/null
+++ b/doc/html/functions.html
@@ -0,0 +1,554 @@
+
+
+
+
+
+
+
+NATS C Client with JetStream and Streaming support: Class Members
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
+
+
The nats.io C Client, Supported by Synadia Communications Inc.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Here is a list of all class members with links to the classes they belong to:
NATS.IO Supported By Synadia Communications Inc.
+
+
+
+
+
+
diff --git a/doc/html/globals.html b/doc/html/globals.html
index 2cb41223..e23f5407 100644
--- a/doc/html/globals.html
+++ b/doc/html/globals.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: File Members
+NATS C Client with JetStream and Streaming support: File Members
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
@@ -85,675 +85,567 @@
Here is a list of all file members with links to the files they belong to:
diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html
index 0ec12fef..b5ff3394 100644
--- a/doc/html/globals_defs.html
+++ b/doc/html/globals_defs.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: File Members
+NATS C Client with JetStream and Streaming support: File Members
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/globals_dup.js b/doc/html/globals_dup.js
index ddd40c89..7c4eb6c1 100644
--- a/doc/html/globals_dup.js
+++ b/doc/html/globals_dup.js
@@ -1,5 +1,6 @@
var globals_dup =
[
- [ "n", "globals.html", null ],
+ [ "j", "globals.html", null ],
+ [ "n", "globals_n.html", null ],
[ "s", "globals_s.html", null ]
];
\ No newline at end of file
diff --git a/doc/html/globals_enum.html b/doc/html/globals_enum.html
index 6ec30c96..2cf401be 100644
--- a/doc/html/globals_enum.html
+++ b/doc/html/globals_enum.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: File Members
+NATS C Client with JetStream and Streaming support: File Members
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/globals_eval.html b/doc/html/globals_eval.html
index 8c46a567..40816a94 100644
--- a/doc/html/globals_eval.html
+++ b/doc/html/globals_eval.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: File Members
+NATS C Client with JetStream and Streaming support: File Members
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html
index 85de764e..787b8f71 100644
--- a/doc/html/globals_func.html
+++ b/doc/html/globals_func.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: File Members
+NATS C Client with JetStream and Streaming support: File Members
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/globals_s.html b/doc/html/globals_s.html
index b1d1fc90..01f30d9e 100644
--- a/doc/html/globals_s.html
+++ b/doc/html/globals_s.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: File Members
+NATS C Client with JetStream and Streaming support: File Members
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/globals_type.html b/doc/html/globals_type.html
index 67238aff..33dc43ff 100644
--- a/doc/html/globals_type.html
+++ b/doc/html/globals_type.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: File Members
+NATS C Client with JetStream and Streaming support: File Members
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
Callback used to process asynchronous publish errors from JetStream js_PublishAsync and js_PublishMsgAsync calls. The provided jsPubAckErr object gives the user access to the encountered error along with the original message sent to the server for possible restransmitting.
+
Note
If the message is resent, the library will not destroy the original message and once again take ownership of it. To resend the message, do the following so that the library knows not to destroy the message (since the call will clear the Msg field from the jsPubAckErr object).
The jsPubAckErr object and its content will be invalid as soon as the callback returns.
+
+Unlike a NATS message callback, the user does not have to destroy the original NATS message (present in the jsPubAckErr object), the library will do it.
the location where to store the pointer to the new jsStreamInfo object in response to the creation request, or NULL if the stream information is not needed.
the location where to store the pointer to the new jsStreamInfo object in response to the creation request, or NULL if the stream information is not needed.
the location where to store the pointer to the new jsConsumerInfo object in response to the creation request, or NULL if the consumer information is not needed.
A JetStream context is used for messaging and assets management.
+
Since the underlying NATS connection is used for communication, the NATS connection should stay valid while using the JetStream context. That is, do not close/destroy the NATS connection before destroying the JetStream context.
+
Note
When done, the context should be destroyed to release memory.
+
Parameters
+
+
js
the location where to store the pointer to the newly created jsCtx object.
+
nc
the pointer to the natsConnection object from which to get the JetStream context.
+
opts
the pointer to the jsOptions object, possibly NULL.
This is the synchronous version of natsMsg_Ack. This indicates successful message processing, and waits for confirmation from the server that the acknowledgment has been processed.
If you are not interested in inspecting the publish acknowledgment, you can pass NULL, but keep in mind that the publish acknowledgment is still sent by the server.
+
+The returned jsPubAck object needs to be destroyed with jsPubAck_Destroy when no longer needed.
Publishes a message asynchronously to JetStream. User can call js_PublishAsyncComplete to be notified when all publish acknowledgments for the pending publish calls have been received.
+
Note
If this call is successful, the library takes ownership of the message and will destroy it after the acknowledgment has been received, or will present it to the user through the jsPubAckErrHandler callback. To prevent the user from accessing/destroying the message while in use by the library, this function requires a pointer to the pointer of the message so that it can be cleared. That way, the user should always call natsMsg_Destroy, regardless of success or failure, since natsMsg_Destroy will have no effect if the message pointer is NULL.
the memory location where the pointer to the natsMsg object is located. If the library takes ownership of the message, this location will be cleared so a following call to natsMsg_Destroy would have no effect.
This call returns the list of all asynchronously published messages for which no acknowledgment have been received yet.
+
The user has now back ownership of the messages and can resend send if desired or simply destroy them.
+
Note
After this call returns, it is possible that acknowledgments arrive from the server but since they have been removed from the pending list, the acknowledgments will be discarded (no jsPubAckErrHandler callback invoked). If the server did receive a particular message and the user in the meantime has resent that message, it would be a duplicate, so in order for the server to detect this duplicate, ensure that the stream's duplicate window setting is specified and a unique message ID was set when sending the message.
+
Warning
The user must call natsMsgList_Destroy to release memory allocated by this call and destroy all pending messages still present in the list.
+
natsMsgList pending;
+
+
s = js_PublishAsyncGetPendingList(&pending, js);
+
if (s == NATS_OK)
+
{
+
int i;
+
+
for (i=0; i<pending.Count; i++)
+
{
+
if (your_decision_to_resend(pending.Msgs[i]))
+
{
+
// If the call is successful, pending.Msgs[i] will
+
// be set to NULL so the message will not be
+
// destroyed.
+
js_PublishMsgAsync(js, &(pending.Msgs[i]), NULL);
+
}
+
}
+
+
// Calling this will release memory allocated to hold the
+
// array of messages but also call natsMsg_Destroy on all
+
// messages still present in the array.
+
natsMsgList_Destroy(&pending);
+
}
+
Parameters
+
+
pending
pointer to a natsMsgList object, typically defined on the stack.
A pull based consumer is a type of consumer that does not have a delivery subject, that is the library has to request for the messages to be delivered as needed from the server.
+
Note
All pull subscriptions must have a durable name.
+
Parameters
+
+
sub
the location where to store the pointer to the newly created natsSubscription object.
Fetches up to batch messages from the server, waiting up to timeout milliseconds. No more thant batch messages will be returned, however, it can be less.
+
For batch greater than 1, this call will not necessarily wait up timeout milliseconds if some messages were collected and the library receives a notification that no more messages are available at this time.
+ It means that calling natsSubscription_Fetch(&list, sub, 10, 5000) may return after less than 5 seconds with only 3 messages.
+
Parameters
+
+
list
the location to a natsMsgList that will be filled by the result of this call.
If Heartbeat is configured in jsConsumerConfig object (or configured in an existing JetStream consumer), the server sends heartbeats to the client at the given interval.
+
Those heartbeats contains information that allow the application to detect a mismatch between the server and client's view of the state of the consumer.
+
If the library detects a sequence mismatch, the behavior is different depending on the type of subscription:
This function iterates through the list of all messages and call natsMsg_Destroy for each valid (not set to NULL) message. It then frees the array that was allocated to hold pointers to those messages.
+
Note
The natsMsgList object itself is not freed since it is expected that users will pass a pointer to a stack object. Should the user create its own object, it will be the user responsibility to free this object.
The key will be store as its canonical form, that is, the key "my-key" is stored as "My-Key".
-
Warning
Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of natsMsg may possible be altered during this call.
+
Warning
Prior to v3.0.0, the key was stored in its canonical form, this is no longer the case. Header keys are now case sensitive.
+
+Headers are not thread-safe, that is, you must not set/add/get values or delete keys for the same message from different threads. The internal structure of natsMsg may possible be altered during this call.
diff --git a/doc/html/group__msg_group.js b/doc/html/group__msg_group.js
index 3115983b..9348c01b 100644
--- a/doc/html/group__msg_group.js
+++ b/doc/html/group__msg_group.js
@@ -1,5 +1,6 @@
var group__msg_group =
[
+ [ "natsMsgList_Destroy", "group__msg_group.html#ga1a091d24f939d881bf04fba78b8995c2", null ],
[ "natsMsg_Create", "group__msg_group.html#ga098e4fec1c5a71c00a0d092fbd6d1a21", null ],
[ "natsMsg_GetSubject", "group__msg_group.html#gae4338b582ab420cf6d8373bef8cffd75", null ],
[ "natsMsg_GetReply", "group__msg_group.html#gaf3e9ab8edfa09b1e40ddb969d9ba5f01", null ],
diff --git a/doc/html/group__opts_group.html b/doc/html/group__opts_group.html
index 99eaf61a..ef0555fd 100644
--- a/doc/html/group__opts_group.html
+++ b/doc/html/group__opts_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Options
+NATS C Client with JetStream and Streaming support: Options
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/group__stan_conn_group.html b/doc/html/group__stan_conn_group.html
index b95dc677..9657f70f 100644
--- a/doc/html/group__stan_conn_group.html
+++ b/doc/html/group__stan_conn_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Streaming Connection
+NATS C Client with JetStream and Streaming support: Streaming Connection
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/group__stan_conn_mgt_group.html b/doc/html/group__stan_conn_mgt_group.html
index 145c62fd..3e6bc716 100644
--- a/doc/html/group__stan_conn_mgt_group.html
+++ b/doc/html/group__stan_conn_mgt_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Management
+NATS C Client with JetStream and Streaming support: Management
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/group__stan_conn_opts_group.html b/doc/html/group__stan_conn_opts_group.html
index e5d05e66..97cf9414 100644
--- a/doc/html/group__stan_conn_opts_group.html
+++ b/doc/html/group__stan_conn_opts_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Streaming Connection Options
+NATS C Client with JetStream and Streaming support: Streaming Connection Options
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/group__stan_conn_pub_group.html b/doc/html/group__stan_conn_pub_group.html
index 4634fed9..19bfa025 100644
--- a/doc/html/group__stan_conn_pub_group.html
+++ b/doc/html/group__stan_conn_pub_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Publishing
+NATS C Client with JetStream and Streaming support: Publishing
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/group__stan_conn_sub_group.html b/doc/html/group__stan_conn_sub_group.html
index aebe9edc..df5a8f44 100644
--- a/doc/html/group__stan_conn_sub_group.html
+++ b/doc/html/group__stan_conn_sub_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Subscribing
+NATS C Client with JetStream and Streaming support: Subscribing
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/group__stan_msg_group.html b/doc/html/group__stan_msg_group.html
index dd3d7e4f..4299f89d 100644
--- a/doc/html/group__stan_msg_group.html
+++ b/doc/html/group__stan_msg_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Streaming Message
+NATS C Client with JetStream and Streaming support: Streaming Message
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/group__stan_sub_group.html b/doc/html/group__stan_sub_group.html
index 87b1f47d..15c1eee4 100644
--- a/doc/html/group__stan_sub_group.html
+++ b/doc/html/group__stan_sub_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Streaming Subscription
+NATS C Client with JetStream and Streaming support: Streaming Subscription
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/group__stan_sub_opts_group.html b/doc/html/group__stan_sub_opts_group.html
index 72f2c737..9104d8a2 100644
--- a/doc/html/group__stan_sub_opts_group.html
+++ b/doc/html/group__stan_sub_opts_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Streaming Subscription Options
+NATS C Client with JetStream and Streaming support: Streaming Subscription Options
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/group__stats_group.html b/doc/html/group__stats_group.html
index 5071cbb3..d187ebc6 100644
--- a/doc/html/group__stats_group.html
+++ b/doc/html/group__stats_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Statistics
+NATS C Client with JetStream and Streaming support: Statistics
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/group__status_group.html b/doc/html/group__status_group.html
index e94d7c73..ba24f482 100644
--- a/doc/html/group__status_group.html
+++ b/doc/html/group__status_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Status
+NATS C Client with JetStream and Streaming support: Status
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/group__sub_group.html b/doc/html/group__sub_group.html
index fd176fc2..c5697bba 100644
--- a/doc/html/group__sub_group.html
+++ b/doc/html/group__sub_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Subscription
+NATS C Client with JetStream and Streaming support: Subscription
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/group__types_group.html b/doc/html/group__types_group.html
index b467b876..1b38c384 100644
--- a/doc/html/group__types_group.html
+++ b/doc/html/group__types_group.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: Types
+NATS C Client with JetStream and Streaming support: Types
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
Used by some APIs which return a list of natsMsg objects.
+
Those APIs will not create the object, but instead initialize the object to which a pointer to that object will be passed to it. Typically, the user will define the object on the stack and pass a pointer to this object to APIs that require a pointer to a natsMsgList object.
+
Similarly, calling natsMsgList_Destroy will call natsMsg_Destroy on any message still in the list, free the array containing pointers to the messages, but not free the natsMsgList object itself.
+
Note
If the user wants to keep some of the messages from the list, the pointers of those messages in the Msgs array should be set to NULL. The value Count MUST not be changed. The function natsMsgList_Destroy will iterate through all pointers in the list and only destroy the ones that have not been set to NULL.
These are options that you can provide to JetStream publish APIs.
+
The common usage will be to initialize a structure on the stack by calling jsPubOptions_Init. Note that strings are owned by the application and need to be valid for the duration of the API call this object is passed to.
+
Note
It is the user responsibility to free the strings if they have been allocated.
There are sensible defaults for most. If no subjects are given the name will be used as the only subject.
+
In order to add/update a stream, a configuration needs to be set. The typical usage would be to initialize all required objects on the stack and configure them, then pass the pointer to the configuration to js_AddStream or js_UpdateStream.
+
Note
The strings are applications owned and will not be freed by the library.
In order to add a consumer, a configuration needs to be set. The typical usage would be to initialize all required objects on the stack and configure them, then pass the pointer to the configuration to js_AddConsumer.
+
Note
OptStartTime needs to be expressed as the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970.
+
+The strings are applications owned and will not be freed by the library.
+
+SampleFrequency is a sampling value, represented as a string such as "50" for 50%, that causes the server to produce advisories for consumer ack metrics. If the percent sign is in the string, and since % is an escape character, it needs to be doubled, such as cfg.SampleFrequency = "50%%";.
This represents a consumer sequence mismatch between the server and client views.
+
This can help applications find out if messages have been missed. Without this and during a disconnect, it would be possible that a subscription is not aware that it missed messages from the server. When acknowledgment mode is other than js_AckNone, messages would ultimately be redelivered, but for js_AckNone, they would not. But even with an acknowledgment mode this may help finding sooner that something went wrong and let the application decide if it wants to recreate the subscription starting at a given sequence.
+
The gap of missing messages could be calculated as ConsumerServer-ConsumerClient.
These are options that you can provide to JetStream subscribe APIs.
+
The common usage will be to initialize a structure on the stack by calling jsSubOptions_Init. Note that strings are owned by the application and need to be valid for the duration of the API call this object is passed to.
+
Note
It is the user responsibility to free the strings if they have been allocated.
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/index.html b/doc/html/index.html
index 3275ba62..dbc3a8b5 100644
--- a/doc/html/index.html
+++ b/doc/html/index.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: NATS C client.
+NATS C Client with JetStream and Streaming support: NATS C client.
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/libevent_8h.html b/doc/html/libevent_8h.html
index dfb6bb4c..f350df5f 100644
--- a/doc/html/libevent_8h.html
+++ b/doc/html/libevent_8h.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: libevent.h File Reference
+NATS C Client with JetStream and Streaming support: libevent.h File Reference
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/libevent_8h_source.html b/doc/html/libevent_8h_source.html
index ce99ea2a..a4b6bc45 100644
--- a/doc/html/libevent_8h_source.html
+++ b/doc/html/libevent_8h_source.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: libevent.h Source File
+NATS C Client with JetStream and Streaming support: libevent.h Source File
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/libuv_8h.html b/doc/html/libuv_8h.html
index e5c361ed..2db486fe 100644
--- a/doc/html/libuv_8h.html
+++ b/doc/html/libuv_8h.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: libuv.h File Reference
+NATS C Client with JetStream and Streaming support: libuv.h File Reference
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
diff --git a/doc/html/libuv_8h_source.html b/doc/html/libuv_8h_source.html
index b44036c6..f3350016 100644
--- a/doc/html/libuv_8h_source.html
+++ b/doc/html/libuv_8h_source.html
@@ -5,7 +5,7 @@
-NATS C Client with Streaming support: libuv.h Source File
+NATS C Client with JetStream and Streaming support: libuv.h Source File
@@ -25,8 +25,8 @@
-
NATS C Client with Streaming support
- 2.6.0
+
NATS C Client with JetStream and Streaming support
+ 3.0.0
The nats.io C Client, Supported by Synadia Communications Inc.
Heartbeat interval expressed in number of nanoseconds. More...
+
+
+
Detailed Description
+
Configuration of a JetStream consumer.
+
In order to add a consumer, a configuration needs to be set. The typical usage would be to initialize all required objects on the stack and configure them, then pass the pointer to the configuration to js_AddConsumer.
+
Note
OptStartTime needs to be expressed as the number of nanoseconds passed since 00:00:00 UTC Thursday, 1 January 1970.
+
+The strings are applications owned and will not be freed by the library.
+
+SampleFrequency is a sampling value, represented as a string such as "50" for 50%, that causes the server to produce advisories for consumer ack metrics. If the percent sign is in the string, and since % is an escape character, it needs to be doubled, such as cfg.SampleFrequency = "50%%";.
This is the consumer sequence last sent by the server. More...
+
+
+
Detailed Description
+
This represents a consumer sequence mismatch between the server and client views.
+
This can help applications find out if messages have been missed. Without this and during a disconnect, it would be possible that a subscription is not aware that it missed messages from the server. When acknowledgment mode is other than js_AckNone, messages would ultimately be redelivered, but for js_AckNone, they would not. But even with an acknowledgment mode this may help finding sooner that something went wrong and let the application decide if it wants to recreate the subscription starting at a given sequence.
+
The gap of missing messages could be calculated as ConsumerServer-ConsumerClient.
Expected last message sequence for the subject in the stream. More...
+
+
+
Detailed Description
+
JetStream publish options.
+
These are options that you can provide to JetStream publish APIs.
+
The common usage will be to initialize a structure on the stack by calling jsPubOptions_Init. Note that strings are owned by the application and need to be valid for the duration of the API call this object is passed to.
+
Note
It is the user responsibility to free the strings if they have been allocated.
There are sensible defaults for most. If no subjects are given the name will be used as the only subject.
+
In order to add/update a stream, a configuration needs to be set. The typical usage would be to initialize all required objects on the stack and configure them, then pass the pointer to the configuration to js_AddStream or js_UpdateStream.
+
Note
The strings are applications owned and will not be freed by the library.
These are options that you can provide to JetStream subscribe APIs.
+
The common usage will be to initialize a structure on the stack by calling jsSubOptions_Init. Note that strings are owned by the application and need to be valid for the duration of the API call this object is passed to.
+
Note
It is the user responsibility to free the strings if they have been allocated.
If specified, the library will only bind to this stream, otherwise, the library communicates with the server to get the stream name that has the matching subject given to the js_Subscribe family calls.
If specified, the js_Subscribe family calls will only attempt to create a subscription for this matching consumer.
+
That is, the consumer should exist prior to the call, either created by the application calling js_AddStream or it should have been created with some other tools such as the NATS cli.
If specified, the low level NATS subscription will be a queue subscription, which means that the load on the delivery subject will be balanced across multiple members of the same queue group.
+
This makes sense only if the delivery subject in the Config field of jsSubOptions is the same for the members of the same group.
Used by some APIs which return a list of natsMsg objects.
+
Those APIs will not create the object, but instead initialize the object to which a pointer to that object will be passed to it. Typically, the user will define the object on the stack and pass a pointer to this object to APIs that require a pointer to a natsMsgList object.
+
Similarly, calling natsMsgList_Destroy will call natsMsg_Destroy on any message still in the list, free the array containing pointers to the messages, but not free the natsMsgList object itself.
+
Note
If the user wants to keep some of the messages from the list, the pointers of those messages in the Msgs array should be set to NULL. The value Count MUST not be changed. The function natsMsgList_Destroy will iterate through all pointers in the list and only destroy the ones that have not been set to NULL.