is there a way to find the events which have a particular traceId (using Axon API)? If not, will Axon provide any functionality in the near future to actually query the traceId values in the events/aggregates? E.g. something along the lines “DomainEventStream readEvents(String aggregateIdentifier, … traceId)”.
Use case: we want to annul a particular event in an aggregate A (annulment means essentially an undo of the state change pertaining to that event, of course by issuing a new AnnulmentEvent - that is a functional requirement). That event caused creation of instances of another aggregate B which lead to AggregateBCreatedEvents (even though we do not use Sagas, as the command-event-command-event… chain is completely synchronous). Now the annulment should also annul (delete) all the instances of aggregate B that had been created by it. Those AggregateBCreatedEvents have the same traceId value as the event to be annulled (. That is how they can be found, but using SQL is not very elegant in this case.