Testing asynchronous message driven architecture

Click for: original source

Tests are vital parts of our systems. Easy to understand and modify tests will help us in keeping the project in good shape for long period of time. First we may start with synchronous code, however sooner or later we will need to start processing part of our flows asynchronously, and this is when Message Driven Architecture becomes handy. By Dariusz Gafka.

Further in the article:

  • Asynchronous execution
  • Running Publisher and Consumer in separate processes
  • Running asynchronous code as synchronous
  • Running Consumer with in memory channel
  • Switch from Polling to Event-Driven
  • Limit scope of your tests

Testing message driven architecture may be challenging, due to decoupled nature and asynchronicity. However it comes with so many pros, especially when the system grows, that is becomes a need at some point of time. Good read!

[Read More]

Tags tdd devops app-development event-driven php