eventstore v0.10.1 EventStore.Subscriptions.StreamSubscriptionProvider behaviour

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

Link to this section Summary

Callbacks

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

Get the event_id or stream_version from the given event

Get the last seen event_id or stream_version from the acknowledgement

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

Link to this section Types

Link to this type ack()
ack() :: {event_id :: non_neg_integer, stream_version :: non_neg_integer}
Link to this type last_seen()
last_seen() :: non_neg_integer
Link to this type read_batch_size()
read_batch_size() :: non_neg_integer
Link to this type stream_uuid()
stream_uuid() :: String.t
Link to this type subscription_name()
subscription_name() :: String.t

Link to this section Callbacks

Link to this callback 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

Link to this callback event_id(event)
event_id(event) :: non_neg_integer

Get the event_id or stream_version from the given event

Link to this callback extract_ack(ack)
extract_ack(ack) :: non_neg_integer

Get the last seen event_id or stream_version from the acknowledgement

Link to this callback last_ack(subscription)
last_ack(subscription) :: non_neg_integer

Get the last ack'd event for the given subscription

Link to this callback unseen_event_stream(stream_uuid, last_seen, read_batch_size)

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