JbdcEventStore in Axon 3


In Axon2 we were using

JdbcEventStore.readEvents(String type, Object identifier, long firstSequenceNumber, long lastSequenceNumber)

to fetch the state of an AR up until a given point in time. Is there an alternative for this in Axon 3, searching around the code in core I could not find anything equally obvious. Is this where EventProcessors and Tokens somehow come into play ?


You can use
org.axonframework.eventsourcing.eventstore.EventStore#readEvents(java.lang.String, long)

In the returned stream, you’d have to filter out messages with the right sequence number (or just stop iterating when hitting the max sequence number).

Hope this helps.