Skip to main content

archiver_consumer_config

Function archiver_consumer_config 

Source
pub(crate) fn archiver_consumer_config(
    consumer_name: &str,
    subject: &str,
    rotate_secs: u64,
) -> Config
Expand description

Consumer settings that let acks wait until a file is closed.

ack_wait must outlast one full rotation window plus the idle-close delay, or JetStream would redeliver messages that are still waiting in an open file. It is set to three rotation windows plus IDLE_CLOSE_AFTER plus 120 seconds of margin (18 minutes for a 300 second window). The consumer uses explicit acks and CONSUMER_MAX_ACK_PENDING.

ยงArguments

  • consumer_name - Durable consumer name.
  • subject - Subject the consumer filters on.
  • rotate_secs - Rotation window length in seconds.