79523254

Date: 2025-03-20 14:33:55
Score: 1.5
Natty:
Report link

To ensure ms-2 invokes @EventHandler for events from other microservices, e.g. ms-1, event classes must have the same package hierarchy.

For example, if ms-1 publishes an event com.example.events.ProfileCreated, you must ensure that in the ms-2 project the ProfileCreated event is located just at com.example.events.ProfileCreated too.

It does not matter if you manually copy events between projects or create a separate library dedicated specially for such events.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @EventHandler
  • Low reputation (1):
Posted by: Dmytro Ivashchenko