Currently I’m using axon.version 3.4.2 and spring boot 2.1.1
I have an array of Records, where each record has a particular state, each state has its own event manager
Something like that:
aggregate identifier | secuenceNumber | payLoadType
2fcb 0 ModifyEvent
2fcb 1 AssignEvent
2fcb 2 ApprovalEvent
next event CloseEvent
Questions
1.- How to ignore the sequence and get the last event? in this case, I should only get the last ApprovalEvent to continue with closeEvent.
2.- The execution time in the example takes too much for each command, which is the best solution for
implement batch processing (eg send 100 records to change states) using Axon?
`
@Aggregate
`
public class Allocate extends BaseAggregate {
@CommandHandler
public void on(ModifyEvent command, GetBeanService service){
…
}
@EventSourcingHandler
public void on(ModifyEvent event){
…
}
@CommandHandler
public Allocate(AssignEvent command, GetBeanService service) {
…
}
@EventSourcingHandler
public void on(AssignEvent event) {
…
}
@CommandHandler
public void on(ApprovalEvent command, GetBeanService service) {
…
}
@EventSourcingHandler
public void on(ApprovalEvent event) {
…
}
@CommandHandler
public void on(CloseEvent command, GetBeanService service) {
…
}
@EventSourcingHandler
public void on(CloseEvent event){
…
}
}
Any ideas to improve our solution? Any workaround?
thank you very much for your help.
Best Regards
Nelson