swarrot / SwarrotBundle

A symfony bundle for swarrot integration
MIT License
89 stars 59 forks source link

Symfony Messenger and Swarrot compatibility #164

Open db306 opened 4 years ago

db306 commented 4 years ago

Hello, I would like to know if Swarrot is "compatible" with Messenger or whether it makes no point of using both ? I use Messenger for internal bus and I dispatch messages on a rabbitmq but there is no retry mechanism and seems like there are many options missing that I can find here. Can we configure Messenger as a custom broker for instance ?

Thank you very much

odolbeau commented 4 years ago

Hi @db306

I did not use Messenger enough to give you a perfect answer, but here is my opinion.

Messenger is fine if you want to deal with a broker (any broker) with the same Symfony application (for publishing & processing of messages). However it lacks some useful features (like retry afaik). Swarrot is fine when you have "advanced" needs, specially if you use RabbitMQ.

You can use both Messenger & swarrot in your application depending on your needs: Messenger for simple needs & swarrot when you have to deal with more complex needs for example. You could also write a Swarrot Message Provider which will use Messenger to retrieve messages but I'm not sure it makes sens.

Personally, I would use Swarrot only because I know it pretty well but I'm definitively not objective enough. :)