taskiq icon indicating copy to clipboard operation
taskiq copied to clipboard

Added on_send_error middleware hook

Open hawang-wish opened this issue 1 year ago • 1 comments

Hi,

I am currently working on a retrying feature to ensure the delivery of messages when the queue service is unstable. I found that it could be really helpful to have this on_send_error so that we can store the failed message and retry later.

I've also added a bool return to make it able to mute exceptions so that we don't have to try-catch the kicking everywhere.

The execution order of on_send_error is reversed, just like what I suggested in https://github.com/taskiq-python/taskiq/pull/359 .

Please let me know if you have some ideas, suggestions or concerns, and big thanks in advance!

hawang-wish avatar Aug 29 '24 08:08 hawang-wish