vmware-archive / kafka-trigger

Kubernetes CRD controller for Kafka topic as event source for Kubeless functions
Apache License 2.0
28 stars 34 forks source link

Retry functions upon error #7

Open maximmass opened 6 years ago

maximmass commented 6 years ago

Is this a BUG REPORT or FEATURE REQUEST?: Feature request

What happened: Errors in Kafka-triggered functions have no retries

What you expected to happen: A Kafka trigger would have a configurable retry count and perhaps a backoff period

How to reproduce it (as minimally and precisely as possible): Have a function throw an unhandled exception. Notice that the next message is processed.

Anything else we need to know?: Error handling with Kafka isn't entirely straightforward but an optional and configurable retry + backoff time when creating the trigger would be helpful.

Environment:

sepetrov commented 4 years ago

Hi @andresmgot , is this behaviour intentional?

If yes, then I don't see how one can handle failures when processing a message.

If no, do you have any ideas / functional requirements? I might be able to help.

andresmgot commented 4 years ago

Hi yes, Kubeless approach regarding functions is executing them "at most once" (vs "at least once"). This means that if a message get lost or the execution fails it doesn't get re-triggered.

You can always write an orchestrator function, this function can be in charge of calling other functions and in case it gets an error, retry it.

sepetrov commented 4 years ago

Thanks, @andresmgot! That makes sense