Extreme.PersistentSubscription.nack
You're seeing just the function
nack
, go back to Extreme.PersistentSubscription module for more information.
Specs
nack( pid(), event() | event_id() | [event() | event_id()], binary(), :unknown | :park | :retry | :skip | :stop, String.t() ) :: :ok
Acknowledges that an event or set of events could not be handled.
See ack/3
for information on event
and correlation_id
.
action
can be any of the following
:unknown
:park
:retry
:skip
:stop
The :park
action sets aside the event in the Parked Messages queue, which
may be replayed via the HTTP
API
or by button click in the EventStore Persistent Subscriptions dashboard.
When an event reaches the max retry count configured by the
:max_retry_count
field in Extreme.Messages.CreatePersistentSubscription
,
the event is parked.
Example
def handle_cast({:on_event, event, correlation_id}, state) do
# .. do some processing ..
# in the case that the processing fails and should be retried:
:ok = Extreme.PersistentSubscription.nack(state.subscription_pid, event, correlation_id, :retry)
{:noreply, state}
end