eventstore v0.8.0 EventStore.Subscriptions.StreamSubscriptionProvider behaviour

Specification to access subscription related event info from a single, or all streams

Summary

Callbacks

Acknowledge receipt of the last seen event for the stream and subscription

Get the stream identity from the given event

Get the last ack'd event for the given subscription

Get a stream of events since the last seen, fetched in batches limited to given size

Types

event()
last_seen()
last_seen() :: non_neg_integer
read_batch_size()
read_batch_size() :: non_neg_integer
stream()
stream() :: pid
stream_uuid()
stream_uuid() :: String.t
subscription()
subscription_name()
subscription_name() :: String.t

Callbacks

ack_last_seen_event(stream_uuid, subscription_name, last_seen)
ack_last_seen_event(stream_uuid, subscription_name, last_seen) ::
  :ok |
  {:error, reason :: any}

Acknowledge receipt of the last seen event for the stream and subscription

event_id(event)
event_id(event) :: non_neg_integer

Get the stream identity from the given event.

last_ack(subscription)
last_ack(subscription) :: non_neg_integer

Get the last ack'd event for the given subscription

unseen_event_stream(stream, last_seen, read_batch_size)
unseen_event_stream(stream, last_seen, read_batch_size) :: Enumerable.t

Get a stream of events since the last seen, fetched in batches limited to given size