Message Queues

RESTful resources aren't the only way of enabling integrations between Bounded Contexts. As we'll see, messaging middleware enables decoupled integrations between different Contexts.

Continuing with the Last Wishes application, we've just implemented a unidirectional relationship between two teams to manage points and badges within their respective Contexts. However, we left an important functionality out of scope on purpose: rewarding the user every time they make a wish.

We could go for another Open Host Service with a pull strategy. The Will Context will be pulling the Gamification Context periodically to get badges on sync (Example: through an scheduler like Cron). This solution will impact the user's experience, and it'll ...

Get Domain-Driven Design in PHP now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.