enum

NATS::JetStream::StreamConfig::RetentionPolicy

Inherits Enum / Comparable / Value / Object

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,
)

Constants

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.

Instance methods

interest?

Returns true if this enum value equals Interest

Source
limits?

Returns true if this enum value equals Limits

Source
workqueue?

Returns true if this enum value equals Workqueue

Source