Extreme.PersistentSubscription.ack
You're seeing just the function
ack
, go back to Extreme.PersistentSubscription module for more information.
Specs
Acknowledges that an event or set of events have been successfully processed.
ack/3
takes any of the following for event ID:
- a full event, as given in the
{:on_event, event, correlation_id}
cast - the
event_id
of an event (either from its:link
or:event
, depending on if the event comes from a projection or a normal stream, respectively) - a list of either sort
correlation_id
comes from the :on_event
cast.
Example
def handle_cast({:on_event, event, correlation_id}, state) do
# .. do some processing ..
# when the processing completes successfully:
:ok = Extreme.PersistentSubscription.ack(state.subscription_pid, event, correlation_id)
{:noreply, state}
end