You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the process methods fail and nack upon any exception raised in the processing.
The idea is to give users a way to make decisions upon failures. This can be used to implement exponential backoff, dead-lettering of malformed messages, etc...
The basic abstraction could look like:
// this is a SAM, so any function Throwable => F[Decision] will do// the `F` allows for logging or any other effectful action suited for the handlertraitErrorHandler[F[_]] {
defhandle(msg: RawMessage, t: Throwable):F[Decision]
}
sealedtraitDecisionobjectDecision {
caseobjectDropextendsDecisioncaseclassFail(t: Throwable, ack: Boolean) extendsDecisioncaseobjectDeadLetterextendsDecisioncaseclassReenqueue(delay: Option[FiniteDuration]) extendsDecision
}
We can provide a sensible default handler (nacking on any error except for deserialization errors for instance).
The text was updated successfully, but these errors were encountered:
Idea from #13 (comment)
Currently the
process
methods fail and nack upon any exception raised in the processing.The idea is to give users a way to make decisions upon failures. This can be used to implement exponential backoff, dead-lettering of malformed messages, etc...
The basic abstraction could look like:
We can provide a sensible default handler (nacking on any error except for deserialization errors for instance).
The text was updated successfully, but these errors were encountered: