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? #

Returns true if this enum value equals All


[View source]
def by_start_sequence? #

Returns true if this enum value equals ByStartSequence


[View source]
def by_start_time? #

Returns true if this enum value equals ByStartTime


[View source]
def last? #

Returns true if this enum value equals Last


[View source]
def last_per_subject? #

Returns true if this enum value equals LastPerSubject


[View source]
def new? #

Returns true if this enum value equals New


[View source]
def undefined? #

Returns true if this enum value equals Undefined


[View source]