Hi all.
I’m testing a replayer they will have to replay around 2 million events once we run it in production, until now I’ve been testing replaying one aggregate at a time for development and testing, but now that it seems stable enough I’m trying the JdbcEventStore.visitEvents without criteria, like this:
((EventStoreManagement) expensefloEventStore).visitEvents(domainEvent -> {
try {
isolatedEventBus.publish(domainEvent);
} catch (Exception e) {
log.error(domainEvent.getIdentifier(), e);
}
});
The diference to the “aggregate one at a time” is only the crteira:
CriteriaBuilder entry = ((EventStoreManagement) eventStore).newCriteriaBuilder();
Criteria criteria = entry.property("aggregate_identifier").is(uuid);
securityService.runAsAdministrator((id) -> {
((EventStoreManagement) expensefloEventStore).visitEvents(criteria, domainEvent -> {
try {
isolatedEventBus.publish(domainEvent);
} catch (Exception e) {
log.error(domainEvent.getIdentifier(), e);
}
});
});
So now what it happens with no criteria is:
- goes ok until PreparedStatementIterator
ResultSet resultSet = statement.executeQuery();
being the statement
select event_identifier, aggregate_identifier, sequence_number, timestamp, payload_type, payload_revision, TEXT(payload), TEXT(metadata) from axon.expenseflo_domain_event_entry e ORDER BY e.timestamp ASC, e.sequence_number ASC, e.aggregate_identifier ASC
-
it spends 20 min. executing it
-
it returns 1 (!!!) event
get’s the next iteration that also takes 20 min. and returns 1 event…
I also tried to play with the batchSize param but to no effect, I think Postgres does not support batchSize?
I’m using 2.4.6, am I doing something wrong or misusing the event store?
Cheers.