contributte / rabbitmq

🐰 RabbitMQ (AMQP, STOMP, MQTT) using BunnyPHP for Nette Framework (@nette).
https://contributte.org/packages/contributte/rabbitmq.html
MIT License
24 stars 25 forks source link

BulkConsumer doesn't produce errors #63

Open jeancz opened 1 year ago

jeancz commented 1 year ago

I have suspicious about BulkConsumer which silently skips throwable errors. I quickly looked into the code and there is the try-catch block in the BulkConsumer.php which probably cause this.

I would prefer to remove this block and let control returning values by man.

https://github.com/contributte/rabbitmq/blob/96a55a92dd805087e8e9f68af58fc5f46c708899/src/Consumer/BulkConsumer.php#L104

bckp commented 1 year ago

Well, it will definitivly swallow the exception, but how you imagine this will work? If exception is thrown, and 2 messages did pass and third have exception and $ waiting, should we send 2 acks and then nacks with exceptions?