Public event without Axon dependency


what would be the best way to transfer a public event message between two Bounded Contexts where one BC is using Axon 2.0 and the other BC is not aware of Axon at all?

The public message is an immutable java object whose type is known to both BCs and serialized with XStream. RabbitMQ as transport.


Hi Geir,

what you’d probably want to do is send the message’s payload to a queue only. By default, Axon attaches to extra information to optimize deserializing on the receiving end.

You can either wrap the AMQPTerminal with your own that sends unwrapped versions to a specific exchange and the wrapped version to another, or implement an event listener that unwraps a messages and sends the serialized payload to another queue.

Hope this helps you on your way.