How to tell if projection has processed the events generated by a specific command


I’m currently validating whether Axon Framework supports live data / offline mode capabilities.

The way I was planning on doing it is by predicting what the command would do to a projection on the client-side until the command has either failed or the projection has been updated by the events generated by the command.

Is there any way to correlate the command that was dispatched with the current state of the projection?


Hi Wayne,

At the moment the framework does no provide something out of the box for what you’re asking.

One way to achieve this would be to do a subscription query for a model you know your command will update.

Frans’ repo shows an example of how to do this.
The idea behind this is however to spoof a synchronous front-end, so not so much the thing you’re after.

At AxonIQ we do have plans to be able to return the token in the command result message (note that a CommandResultMessage is a Axon 4 feature).
With this, you could thus reply to the ‘command sending party’ that a given command was executed successfuly and that the command has triggered events up to and until token location X.

This is, however, not implemented yet.
So stay tuned for this functionality.

In the mean time, any other ideas how to get this going would be much appreciated I think.


Aw shucks.

I won’t need it for the time being, I was validating that workflow. Allard had mentioned it back in September but I couldn’t finding it. This explains why!

Thanks Steven! :slight_smile: