Replies: 5 comments 4 replies
-
It is kind-of possible, but let discuss further on this topic... The one that is there now is |
Beta Was this translation helpful? Give feedback.
-
I mean, the retry strategy could be "try to deliver the message N times (with some interval strategy) and then, if it still could not be delivered, feed a special object with it". We don't want the messages to stay forever in the buffer, but I think, we also should be able to be notified about every case that could not be handled properly. In a particular application, this might not be necessary, but a lib should allow for this IMO. |
Beta Was this translation helpful? Give feedback.
-
I believe we could build this... Let's think how the API of this should look like... The option To make sure we speak about the same issue - it is not about detection of this fact - there is a metrics on this, and there will be more metrics saying you that the particular message hit the max number of retries... It is about "self healing", right? |
Beta Was this translation helpful? Give feedback.
-
As for the batch it is not about performance at all, it is about ordering. There are two requirements that compete with each other…
1. You want to process messages as they come and don‘t block on errors if the messages are targeting different workflows.
2. You want to stop on first error in a sequence of messages targeting the same workflow, since the order of messages might be crucial..
So what we do is to select messages from the store and determine the target workflow (referenced as Correlation Hint in the library).
Then we group by the correlation hint and get batches of messages targeting the same workflow, and then we apply a sorter to create an order of messages inside a batch. It might be based on receiving time (actually a bad choice), but you can supply your own…). And then we try to correlate the batch by correlating the messages out of it.. if the error occurs, we proceed with the single message based on Single message Error startegy (drop, ignore, retry) and with the whole batch based on the batch correlation mode (all or fail_first) …
Somehow more clear?
… Am 28.04.2022 um 21:49 schrieb fml2 ***@***.***>:
The semantics would be to remove this one particular message from the inbox and pass it to the provided component?
Yes, exactly that. The component could be named undeliverableMessageProcessor (or ...Consumer). It would be called when the message is about to be removed from the storage (i.e. when the retry strategy has given up to deliver the message). If this component processes a message without throwing an exception then the message is removed from the storage. I'm not quite sure what should happen if an exception occurs here. It never should (this should be the conract) but you probably know that things that should not happen still happen.
IMO this should be done not for the batch but for every single message that gets so far. I still have to understand the concept of the batch properly. As of now, I don't understand its purpose other than the performance improvement.
There are other things I have not understood yet (I've learnt the lib just today), but I think this would be a sensible addition.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
Hrm... Ater a thought I probably have to take back the idea with a special entity for dealing with undeliverable messages. This can be integrated into the retry strategy. My first idea was to make it a separate concept in the lib, but if we say that it's the responsibilty of the delivery strategy then this feature is already covered. I.e. a special retry strategy could work like this: try N times and then put the message into the dead letter queue. Of course, the last step could be factored out and made pluggable. But it's then an implementation detail. The statements about the batch (correctness vs. performance) still hold. |
Beta Was this translation helpful? Give feedback.
-
This is a very promising library! What I'm concerned with: What happens to messages that are ignored or can't be delivered within the specified amount of time? Shouldn't the application be able to provide the code to deal with such cases? E.g. in the case of a message not being correlated for too long it could be moved to a "dead letter queue" (or similar). The application should be able to somehow react to this.
Or did I miss something and this is already possible within the lib?
Beta Was this translation helpful? Give feedback.
All reactions