[axonframework] Axon3 + Spring boot websockets

Hi Rich,

The example you give doesn’t sound unreasonable to me to be fair.

I haven’t pushed the actual events over websockets to a web app before though.
What I did do before on a project, was update our views/query side based on the events applied through Axon, and push the updated view using STOMP - WebSockets.
We just pushed delta’s by the way.

In short: having a class with @EventHandler annotated functions emit the actual events directly over WebSockets as in your example, should be doable.

Hope this helps.



Hi Rich,

there is great benefit in sending view models (or better, their deltas), as Steven described. The main advantage is that you get coupling on that model, instead of the entire structure of your events. You would probably need to implement some logic in the client that will also reside somewhere on the server.

If the server only needs to send, you can also consider Server-Sent Events. It’s slightly simpler, as it doesn’t require an HTTP upgrade.

Spring Messaging with Stomp is definitely a good way to go.