NATS C Client with JetStream and Streaming support
3.9.1
The nats.io C Client, Supported by Synadia Communications Inc.
|
Modules | |
JetStream Assets Management | |
Publishing | |
Subscribing | |
Messages | |
Functions | |
NATS_EXTERN natsStatus | jsOptions_Init (jsOptions *opts) |
Initializes a streaming context options structure. More... | |
NATS_EXTERN natsStatus | natsConnection_JetStream (jsCtx **js, natsConnection *nc, jsOptions *opts) |
Returns a new JetStream context. More... | |
NATS_EXTERN void | jsCtx_Destroy (jsCtx *js) |
Destroys the JetStream context. More... | |
JetStream.
NATS_EXTERN natsStatus jsOptions_Init | ( | jsOptions * | opts | ) |
Use this before setting specific stream context options and passing it to JetStream APIs.
opts | the pointer to the jsOptions to initialize. |
NATS_EXTERN natsStatus natsConnection_JetStream | ( | jsCtx ** | js, |
natsConnection * | nc, | ||
jsOptions * | opts | ||
) |
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.
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 . |
NATS_EXTERN void jsCtx_Destroy | ( | jsCtx * | js | ) |
Releases memory used by the context object.
js | the pointer to the jsCtx object to destroy. |