How to avoid Cycle detected when publish event and listen result of this one #921
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You need to decide which module depends on which. In your case, it seems that the Order module is dependent on the Brewing module (Order requires actions from Brewing to execute a certain scenario). Therefore, in my opinion, it makes more sense for the Brewing module to expose the interface of events it can accept, while the Order module emits an event that implements this interface. This way, the Brewing module will depend on the interface it manages itself, eliminating the dependency on the Order module. |
Beta Was this translation helpful? Give feedback.
-
Finally, I found the solution. Just add metadata for |
Beta Was this translation helpful? Give feedback.
Finally, I found the solution. Just add metadata for
order
module to define it is a OPEN module and allow Cycle listenYou can find this commit: thanhtrixx/coffee-shop@b083436