NATS C Client with JetStream and Streaming support
3.9.1
The nats.io C Client, Supported by Synadia Communications Inc.
|
Functions | |
NATS_EXTERN natsStatus | stanConnection_Subscribe (stanSubscription **sub, stanConnection *sc, const char *channel, stanMsgHandler cb, void *cbClosure, stanSubOptions *options) |
Creates a subscription. More... | |
NATS_EXTERN natsStatus | stanConnection_QueueSubscribe (stanSubscription **sub, stanConnection *sc, const char *channel, const char *queueGroup, stanMsgHandler cb, void *cbClosure, stanSubOptions *options) |
Creates a queue subscription. More... | |
Subscribing functions.
NATS_EXTERN natsStatus stanConnection_Subscribe | ( | stanSubscription ** | sub, |
stanConnection * | sc, | ||
const char * | channel, | ||
stanMsgHandler | cb, | ||
void * | cbClosure, | ||
stanSubOptions * | options | ||
) |
Expresses interest in the given subject. The subject can NOT have wildcards. Messages will be delivered to the associated stanMsgHandler.
sub | the location where to store the pointer to the newly created natsSubscription object. |
sc | the pointer to the natsConnection object. |
channel | the channel this subscription is created for. |
cb | the stanMsgHandler callback. |
cbClosure | a pointer to an user defined object (can be NULL ). See the stanMsgHandler prototype. |
options | the optional to further configure the subscription. |
NATS_EXTERN natsStatus stanConnection_QueueSubscribe | ( | stanSubscription ** | sub, |
stanConnection * | sc, | ||
const char * | channel, | ||
const char * | queueGroup, | ||
stanMsgHandler | cb, | ||
void * | cbClosure, | ||
stanSubOptions * | options | ||
) |
Creates a queue subscriber on the given channel. All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message asynchronously.
sub | the location where to store the pointer to the newly created natsSubscription object. |
sc | the pointer to the natsConnection object. |
channel | the channel name this subscription is created for. |
queueGroup | the name of the group. |
cb | the natsMsgHandler callback. |
cbClosure | a pointer to an user defined object (can be NULL ). See the natsMsgHandler prototype. |
options | the optional options to further configure this queue subscription. |