View Source Solvent.EventStore (solvent v0.2.0)

ETS-based storage for Solvent.Event objects.

Events are stored using insert/2, along with an enumerable of subscriber IDs. The event is then stored until all subscribers call ack/2 to acknowledge the event, after which point the event is deleted from the store.

The event store is initialized by the Solvent supervisor, so no setup work is necessary to use the store.

Link to this section Summary

Functions

Acknowledge that a listener has finished processing the event.

Remove an event from storage.

Delete all events from the event store.

Fetch an event by ID.

Insert a new event into storage, along with all listeners that need to acknowledge it before it can be deleted.

Link to this section Functions

Link to this function

ack(event_id, listener_id)

View Source

Acknowledge that a listener has finished processing the event.

Remove an event from storage.

Delete all events from the event store.

Fetch an event by ID.

Link to this function

insert(event, pending_ack)

View Source

Insert a new event into storage, along with all listeners that need to acknowledge it before it can be deleted.

This does not activate any subscribers, use Solvent.publish/2 for that.