NATS C Client with JetStream and Streaming support
3.11.0
The nats.io C Client, Supported by Synadia Communications Inc.
|
#include <nats.h>
Public Attributes | |
const char * | Name |
const char * | Description |
const char ** | Subjects |
int | SubjectsLen |
jsRetentionPolicy | Retention |
int64_t | MaxConsumers |
int64_t | MaxMsgs |
int64_t | MaxBytes |
int64_t | MaxAge |
Max age of messages in nanoseconds. | |
int64_t | MaxMsgsPerSubject |
int32_t | MaxMsgSize |
jsDiscardPolicy | Discard |
jsStorageType | Storage |
int64_t | Replicas |
bool | NoAck |
const char * | Template |
int64_t | Duplicates |
jsPlacement * | Placement |
jsStreamSource * | Mirror |
jsStreamSource ** | Sources |
int | SourcesLen |
bool | Sealed |
Seal a stream so no messages can get our or in. | |
bool | DenyDelete |
Restrict the ability to delete messages. | |
bool | DenyPurge |
Restrict the ability to purge messages. | |
bool | AllowRollup |
Allow messages to be placed into the system and purge all older messages using a special message header. | |
jsRePublish * | RePublish |
Allow republish of the message after being sequenced and stored. | |
bool | AllowDirect |
Allow higher performance, direct access to get individual messages. E.g. KeyValue. | |
bool | MirrorDirect |
Allow higher performance and unified direct access for mirrors as well. | |
bool | DiscardNewPerSubject |
Allow KV like semantics to also discard new on a per subject basis. | |
natsMetadata | Metadata |
A user-provided array of key/value pairs, encoded as a string array [n1, v1, n2, v2, ...] representing key/value pairs {n1:v1, n2:v2, ...}. | |
jsStorageCompression | Compression |
js_StorageCompressionNone (default) or js_StorageCompressionS2. | |
uint64_t | FirstSeq |
the starting sequence number for the stream. | |
jsSubjectTransformConfig | SubjectTransform |
Applies a subject transform (to matching messages) before doing anything else when a new message is received. | |
jsStreamConsumerLimits | ConsumerLimits |
Sets the limits on certain options on all consumers of the stream. | |
bool | AllowMsgTTL |
Allow the message to be sent with a time to live (TTL) value. Requires nats-server v2.11.0 or later. | |
int64_t | SubjectDeleteMarkerTTL |
Enables and sets a duration for adding server markers for delete, purge and max age limits. In nanoseconds. Requires nats-server v2.11.0 or later. | |
Configuration of a JetStream stream.
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.
const char* jsStreamConfig::Name |
const char* jsStreamConfig::Description |
const char** jsStreamConfig::Subjects |
int jsStreamConfig::SubjectsLen |
jsRetentionPolicy jsStreamConfig::Retention |
int64_t jsStreamConfig::MaxConsumers |
int64_t jsStreamConfig::MaxMsgs |
int64_t jsStreamConfig::MaxBytes |
int64_t jsStreamConfig::MaxAge |
int64_t jsStreamConfig::MaxMsgsPerSubject |
int32_t jsStreamConfig::MaxMsgSize |
jsDiscardPolicy jsStreamConfig::Discard |
jsStorageType jsStreamConfig::Storage |
int64_t jsStreamConfig::Replicas |
bool jsStreamConfig::NoAck |
const char* jsStreamConfig::Template |
int64_t jsStreamConfig::Duplicates |
jsPlacement* jsStreamConfig::Placement |
jsStreamSource* jsStreamConfig::Mirror |
jsStreamSource** jsStreamConfig::Sources |
int jsStreamConfig::SourcesLen |
bool jsStreamConfig::Sealed |
bool jsStreamConfig::DenyDelete |
bool jsStreamConfig::DenyPurge |
bool jsStreamConfig::AllowRollup |
jsRePublish* jsStreamConfig::RePublish |
bool jsStreamConfig::AllowDirect |
bool jsStreamConfig::MirrorDirect |
bool jsStreamConfig::DiscardNewPerSubject |
natsMetadata jsStreamConfig::Metadata |
jsStorageCompression jsStreamConfig::Compression |
uint64_t jsStreamConfig::FirstSeq |
jsSubjectTransformConfig jsStreamConfig::SubjectTransform |
jsStreamConsumerLimits jsStreamConfig::ConsumerLimits |
bool jsStreamConfig::AllowMsgTTL |
int64_t jsStreamConfig::SubjectDeleteMarkerTTL |