php-ddd icon indicating copy to clipboard operation
php-ddd copied to clipboard

Synch vs asynch messaging

Open webdevilopers opened this issue 8 years ago • 0 comments

I recently started implementing RabbitMQ for some memory and time expensive operations e.g. mailing or generating reports.

Before I had a WRITE model that raised an event with all required data. This event was then consumed by an event bus (@SimpleBus with DoctrineORMBridge) and mailing for instance was handled synchronous.

My first step was to simply serialize the event and publish it via RabbitMQ producer instead of the event bus.

Is this simple replacement fine?

Do you prefer using asynch messages in general or keep simple tasks (updating READ model) synch?

Related:

  • #12
  • https://github.com/SimpleBus/MessageBus/issues/15 @josecelano

Came from: https://twitter.com/webdevilopers/status/829703225452457988

Inviting @michaelperrin @Sander-Toonen @mablae @tPl0ch @cakper @ChristianRiesen

webdevilopers avatar Feb 10 '17 09:02 webdevilopers