I am working with the Axon Framework on my current project. My focus is especially with event processing from an existing event store. One thing that has been noticeably absent in event messages is the globalindex of the domainevententry table. This value is not added to the AbstractDomainEventEntry class and cannot be accessed from a DomainEventMessage. Is there a reason why this value is not added to the event message?
The value is a surrogate key for the aggregateidentifier and sequencenumber. Under normal circumstances, the globalindex is redundant. However, I have a more uncommon use case in that our system has a transaction entity that spans multiple aggregates. Therefore, it would be helpful to read the stream of events using that transaction key and the simplest way to get an ordering of events is the globalindex. This is especially true because tracking tokens use the globalindex to process an event stream. In looking at the Axon Framework source code, I see no particular reason to throw the globalindex away when constructing the domain event entry in the EventStorageEngine. Would it be acceptable to set up a PR that adds the globalindex to the event messages?