enum NATS::JetStream::ConsumerConfig::DeliverPolicy

Overview

Where to begin consuming messages from a stream.

See DeliverPolicy in the NATS server code

Defined in:

jetstream/consumer_config.cr

Enum Members

All = 0

Deliver all messages from a stream via this consumer

Last = 1

Start from the current last message in the stream when this consumer was created

New = 2

Start after the current last message in the stream when this consumer was created. This is different from Last in that it will not begin delivering messages until more are published.

ByStartSequence = 3

Start delivery at the sequence in the stream denoted by opt_start_seq. opt_start_seq is required when this DeliverPolicy is used.

ByStartTime = 4

Start delivery at the first message whose timestamp is equal to or later than opt_start_time. opt_start_time is _required when this DeliverPolicy is used.

LastPerSubject = 5

Similar to Last, but on a per-subject basis.

Undefined = 6

If you've got this set, something's probably borked. This value only exists in this client because the server can send it.

Instance Method Summary

Instance Method Detail

def all? #

[View source]
def by_start_sequence? #

[View source]
def by_start_time? #

[View source]
def last? #

[View source]
def last_per_subject? #

[View source]
def new? #

[View source]
def undefined? #

[View source]