KonstantinCodes / messenger-kafka

Simple Kafka transport for Symfony Messenger.
MIT License
84 stars 35 forks source link

Adds support for failure message during serialization and handling #26

Open rdotter opened 3 years ago

rdotter commented 3 years ago

This solves: https://github.com/KonstantinCodes/messenger-kafka/issues/22

When a message is received and there is an MessageDecodingFailedException thrown during serialization or an exception during handling a WorkerMessageFailedEvent will be dispatched.

@KonstantinCodes

KonstantinCodes commented 3 years ago

Hi @rdotter! Great to see your PR :)

I know we talked about this feature a while ago, and your case definitely makes sense.

Still, I'm a bit unsure about basically making reject() do the same as ack(). It kind of feels like a workaround for code that throws too many Exceptions. (And blocks message processing that way.)

It really strikes me like the same could be achieved with a CatchAllExceptionsMiddleware.