xingfucoder's avatar

Handling Events between differente Application Modules

Imagine that you have your application divided into two parts (subdomains, bounded contexts, sub-packages, or modules) and I'm thinking how to link events betwen this two parts. What would be the better way to firing events from any of these modules and handle it with the other module?

For example:

E-commerce application:

  1. Part. Orders Fire the ProductOrdered event

  2. Part. SupplyManagement Handle with WhenProductOrdered

If these modules are decoupled, how is the better way to link these events?

0 likes
3 replies
keevitaja's avatar

I do not get it... There is no problem with one package listening and another firing as long as it is taking place in the same application. Otherwise use API.

1 like
xingfucoder's avatar

Many thanks @Keevitaja, it is just I need, fire an event within a package and listen throught another package or the main application, but I didn't know if there is any requirement for firing events within any package.

NoorDeen's avatar

but what if this packages in different laravel applications ?

Please or to participate in this conversation.