[axonframework] Command or event...

Hi Sven,

The nicest option would be to update to Axon 4 and benefit from all the new features!

However, I know that’s easier said than done (wrote a piece about it actually).
Let’s put joking aside.

Upfront a button stating “export” sounds like you are commanding something to perform an export.
From an implementation perspective such a button typically returns the data as well, which as you’ve put it rightfully makes it a query.
More specifically, there’s likely a single point (the owner of the projection) in the application which is capable of answering this query.
That makes it a point-to-point query, with a single destination.

From routing specifics that makes this operation very close to a command I’d say, hence I’d pick a command handler for this.
A basic implementation of a query bus / query handler can be implemented based on how command dispatching and handling works.
From experience I can tell you that’s an interesting exercise to go through; again though, this might not be overly feasible in your scenario.

As a last note it might be interesting to discuss with the business whether they want the fact an export was requested to be stored.
If so, then you might argue against a command handler in favor of an event handler, as you’d automatically store the export request too.

This is my 2 cents; hope it helps you out Sven!