struct

Crabbit::OffsetSpecification

Inherits Struct < Value < Object

Describes where a consumer starts reading a stream.

first, last, and next are relative positions. offset addresses an exact stream offset, while timestamp asks the broker for the first chunk at or after a point in time.

Constructors

first

Starts at the first available message in the stream.

Source
last

Starts at the beginning of the last committed chunk.

Source
next

Starts after the current end of the stream and receives new messages.

Source
none

Requests no initial delivery.

This is primarily useful as the inactive result of a Single Active Consumer update callback.

Source
offset(value : Int) : self

Starts at the exact non-negative stream value.

Source
timestamp(value : Time) : self

Starts at the first chunk whose timestamp is at or after value.

Source
timestamp(milliseconds : Int) : self

Starts at the first chunk at or after the Unix timestamp milliseconds.

Source

Instance methods

type

Returns the requested offset mode.

Source
value

Returns the numeric offset or Unix timestamp in milliseconds, when the selected mode requires one.

Source