I played a little bit with the new dead letter queue in Axon 4.6 and came across some parts that seemed a little bit, well, off to me. I would like to discuss those things. Maybe I am just misunderstanding some parts or maybe I just had different expectations (or maybe the documentation has to be tweaked a little bit?)
The documentation states that a call to (for example) sequencedDeadLetterProcessor.processAny( ) processes a dead letter entry. So I assume one would have to build something like a recurring task to start the dead letter processing? Looking at the dead letter queue concept from the outside, I expected the processing to be performed automatically by the framework. Just like the event processing. Why do I have to call the processing manually (or do I? The documentation does not state that clearly to me)?
What exactly is the task of a SequencedDeadLetterProcessor? My first thought was (also based on the name) that it actually does process the dead letters, but it gets a predicate as a parameter. The actual processing seems to be done by the regular event handlers. There isn’t an example for an implementation within the documentation, so I just don’t know what to implement in the process method.
The choice of using an interface for the SequencedDeadLetterProcessor seems orthogonal to other concepts in the Axon framework. Usually we have annotations to mark methods for processing certain elements (event handlers, reset handlers, …). Why use an interface for this? Because it is more of a technical aspect?
The documentation does not state what happens when you reset the tokens of an event processor with dead letter queue. I assume that the queue is cleared (based on the implementation of DeadLetteringEventHandlerInvoker), but it would be nice if this would be a documented behaviour.
Thank you and best regards