NATS C Client with JetStream and Streaming support  3.8.0
The nats.io C Client, Supported by Synadia Communications Inc.
Loading...
Searching...
No Matches
jsConsumerSequenceMismatch Struct Reference

#include <nats.h>

Public Attributes

uint64_t Stream
 This is the stream sequence that the application should resume from.
 
uint64_t ConsumerClient
 This is the consumer sequence that was last received by the library.
 
uint64_t ConsumerServer
 This is the consumer sequence last sent by the server.
 

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.

See also
natsSubscription_GetSequenceMismatch

Member Data Documentation

◆ Stream

uint64_t jsConsumerSequenceMismatch::Stream

◆ ConsumerClient

uint64_t jsConsumerSequenceMismatch::ConsumerClient

◆ ConsumerServer

uint64_t jsConsumerSequenceMismatch::ConsumerServer

The documentation for this struct was generated from the following file: