Reviewable / firelease

Firebase queue consumer for Node with at-least-once semantics.
MIT License
10 stars 1 forks source link

Max Attempts Request #2

Closed calendee closed 9 years ago

calendee commented 9 years ago

I'm still dabbling with Firelease to see if it can fit into my workflow. One issue I see is that Firelease just won't quit. If a queue item fails to process, Firelease keeps trying. Generally this is a good thing. However, after 1K+ plus tries, it's a pretty good bet that something is wrong with that particular queue item.

It'd be great to have a "maxAttempts" setting in the config options. Say after 5 tries, Firelease just ignores this entry. Is that possible now but I overlooked it?

calendee commented 9 years ago

Actually, now that I have #3 resolved, this is not really a problem. It seems Firelease keeps increasing the lease time on each iteration so the entry does not get constantly reprocessed.

pkaminski commented 9 years ago

Firelease is designed with the assumption that every item must eventually be processed ("at least once" semantics). As you noticed, if you set the max lease duration high enough (1 hour, or even 24 hours), this is usually fine even in the face of insurmountable errors. I usually have some monitoring set up to be notified of excessive errors in the logs, and if I determine that a queue item is unrecoverable for some reason and can be safely ignored, I just delete it manually from the Firebase web interface.