mirror of https://gitlab.com/tildes/tildes.git
Browse Source
Add error-handling for event stream consumers
Add error-handling for event stream consumers
Previously, if an event stream consumer hit an error when processing a message, it would crash and restart, and the message that caused the error would be left in "pending" status for that consumer forever while the consumer continued processing new messages. This commit adds some more deliberate handling of messages that cause errors: * When a consumer starts, it will try to read pending messages first. In a case where an error was transient, this should mean that the message that previously caused a crash will be processed on retry. * If a particular message causes the consumer to crash 3 times, it will be considered "dead" and moved out of the consumer's pending list into one specifically for dead messages. These dead queues can be monitored and inspected manually to look into failures, while the consumer can still continue processing new messages. * After clearing or processing all pending messages, consumers go back to waiting for and processing new messages.merge-requests/89/head
Deimos
5 years ago
1 changed files with 80 additions and 12 deletions
Write
Preview
Loading…
Cancel
Save
Reference in new issue