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

Add producer reconnect when timeout #54

Closed kucix closed 12 months ago

kucix commented 3 years ago

This pull request fix situation when is called publish and then script waiting or processing something else (without hearthbeat to rabbitmq) and then (after long time) is called another publish that failes on error like "Could not write data to socket." or "Broken pipe or closed connection.".

f3l1x commented 3 years ago

Thanks @kucix. I think we gonna needed some tests to ensure this feature.

kucix commented 3 years ago

I added test with simulating timeout

f3l1x commented 2 years ago

What do you think @paveljanda?

paveljanda commented 2 years ago

AM not sure about this. In my experience, Broken pipe or closed connection happens because of many reasons and we always fixed it somewhere else. Also, I would suggest using a async framework when the reality calls for it..