I’ve played around with the" Bootiful CQRS with Axon" webinar (very interesting BTW), and I’ve a question related to the level of coupling we really get by using business events exchanged on a queing system such as RabbitMQ.
Normally, in a microservices architecture, we must strive “Strong consistency and loose coupling”.
In this example, a ComplaintFiledEvent is consummed by an external statistic service.To make XStream (the defaullt serializer mechanism) work properly on the consummer side, I’ve been obliged to copy the ComplaintFiledEvent.java file with the same package from the publisher. Otherwize XStream is unable to deserialize the message.
It means that the publisher and the subscriber must share the very same class. This is not exactly what I call “loose coupling”? Is there a way to configure XStream (or another supported serializer mechanism such as Jackson) to enable at least different packages on both sides? Ideally, the consummer side should be able to use a simplified representation of the event with just the attributes it needs …
Do I miss ST?
Thank you for your help.