enum NATS::JetStream::StreamConfig::RetentionPolicy
Overview
The RetentionPolicy
tells the NATS server when messages can be
discarded. Your options are to wait until the a quantity/volume/time
limit has been reached, all consumers have acknowledged, or any
consumers have acknowledged.
jetstream.stream.create(
# ...
retention: :workqueue,
)
Defined in:
jetstream/stream_config.crEnum Members
-
Limits =
0
-
Discard messages when the stream has reached the limit of either the number of messages or the total stream size in bytes, or the message's max age has passed.
-
Interest =
1
-
Discard a message when all subscribed consumers have acknowledged it to guarantee delivery but not keep the message in memory. This is the default behavior of AMQP.
-
Workqueue =
2
-
Discard a message when the first consumer has acknowledged it, as in a work queue like Sidekiq.