# NATS C Client with JetStream and Streaming support: jsConsumerConfig Struct Reference

Loading...
Searching...
No Matches
jsConsumerConfig Struct Reference
Types

`#include <nats.h>`

## Public Attributes

const char * | Name
const char * | Durable
const char * | Description
jsDeliverPolicy | DeliverPolicy
uint64_t | OptStartSeq
int64_t | OptStartTime
| UTC time expressed as number of nanoseconds since epoch.
jsAckPolicy | AckPolicy
int64_t | AckWait
int64_t | MaxDeliver
int64_t * | BackOff
| Redelivery durations expressed in nanoseconds.
int | BackOffLen
const char * | FilterSubject
jsReplayPolicy | ReplayPolicy
uint64_t | RateLimit
const char * | SampleFrequency
int64_t | MaxWaiting
int64_t | MaxAckPending
bool | FlowControl
int64_t | Heartbeat
| Heartbeat interval expressed in number of nanoseconds.
bool | HeadersOnly
int64_t | MaxRequestBatch
| Maximum Pull Consumer request batch size.
int64_t | MaxRequestExpires
| Maximum Pull Consumer request expiration, expressed in number of nanoseconds.
int64_t | MaxRequestMaxBytes
| Maximum Pull Consumer request maximum bytes.
const char * | DeliverSubject
const char * | DeliverGroup
int64_t | InactiveThreshold
| How long the server keeps an ephemeral after detecting loss of interest, expressed in number of nanoseconds.
int64_t | Replicas
bool | MemoryStorage
const char ** | FilterSubjects
int | FilterSubjectsLen
natsMetadata | Metadata

## 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.
  `Durable` cannot contain the character ".".
  `HeadersOnly` means that the subscription will not receive any message payload, instead, it will receive only messages headers (if present) with the addition of the header JSMsgSize ("Nats-Msg-Size"), whose value is the payload size.
  NATS server 2.10 added FilterSubjects, an array of multiple filter subjects. It is mutually exclusive with the previously available single FilterSubject.
  NATS server 2.10 added consumer Metadata which contains user-provided string name/value pairs.

See also
  jsConsumerConfig_Init

jsConsumerInfo *ci = NULL;
jsConsumerConfig cc;
jsConsumerConfig_Init(&cc);
cc.Durable = "MY_DURABLE";
cc.DeliverSubject = "foo";
cc.DeliverPolicy = js_DeliverNew;
s = js_AddConsumer(&ci, js, &cc, NULL, &jerr);

## Member Data Documentation

## Name

const char* jsConsumerConfig::Name

## Durable

const char* jsConsumerConfig::Durable

## Description

const char* jsConsumerConfig::Description

## DeliverPolicy

jsDeliverPolicy jsConsumerConfig::DeliverPolicy

## OptStartSeq

uint64_t jsConsumerConfig::OptStartSeq

## OptStartTime

int64_t jsConsumerConfig::OptStartTime

## AckPolicy

jsAckPolicy jsConsumerConfig::AckPolicy

## AckWait

int64_t jsConsumerConfig::AckWait

## MaxDeliver

int64_t jsConsumerConfig::MaxDeliver

## BackOff

int64_t* jsConsumerConfig::BackOff

## BackOffLen

int jsConsumerConfig::BackOffLen

## FilterSubject

const char* jsConsumerConfig::FilterSubject

## ReplayPolicy

jsReplayPolicy jsConsumerConfig::ReplayPolicy

## RateLimit

uint64_t jsConsumerConfig::RateLimit

## SampleFrequency

const char* jsConsumerConfig::SampleFrequency

## MaxWaiting

int64_t jsConsumerConfig::MaxWaiting

## MaxAckPending

int64_t jsConsumerConfig::MaxAckPending

## FlowControl

bool jsConsumerConfig::FlowControl

## Heartbeat

int64_t jsConsumerConfig::Heartbeat

## HeadersOnly

bool jsConsumerConfig::HeadersOnly

## MaxRequestBatch

int64_t jsConsumerConfig::MaxRequestBatch

## MaxRequestExpires

int64_t jsConsumerConfig::MaxRequestExpires

## MaxRequestMaxBytes

int64_t jsConsumerConfig::MaxRequestMaxBytes

## DeliverSubject

const char* jsConsumerConfig::DeliverSubject

## DeliverGroup

const char* jsConsumerConfig::DeliverGroup

## InactiveThreshold

int64_t jsConsumerConfig::InactiveThreshold

## Replicas

int64_t jsConsumerConfig::Replicas

## MemoryStorage

bool jsConsumerConfig::MemoryStorage

## FilterSubjects

const char** jsConsumerConfig::FilterSubjects

## FilterSubjectsLen

int jsConsumerConfig::FilterSubjectsLen

## Metadata

natsMetadata jsConsumerConfig::Metadata

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

- nats.h