I’d like to limit the number of times that an EventProcessor will attempt to retry an event. My initial thought was to use the metadata on the event message to track the number of times it had been retried and have an ErrorHandler that would increment the value and signal when the event should be abandoned. This was a non-starter however, as I can’t return the modified event message from the ErrorHandler. Another possibility was to have a custom EventProcessor that would track the number of retries and stop processing when the limit was reached. This didn’t seem like an ideal solution though as it would involve a copy-and-paste of the ‘run’ and ‘processNextEntry’ methods from the original to implement the extra logic.
I’m not overly familiar with the architecture yet and feel like I’m probably missing an easy solution somewhere. Any suggestions?