Hi Allard,
Let’s see if I am able to explain this without getting into definition problems.
When my app is started, all events are replayed based on this configuration:
<axon:cluster id=“default” default=“true”/>
<axon:cluster id=“identityCluster” order=“0”>
<axon:replay-config event-store=“eventStore” />
axon:selectors
<axon:package prefix=“com.giffdiff.identity.view”/>
</axon:selectors>
</axon:cluster>
<axon:cluster id=“projectCluster” order=“0”>
<axon:replay-config event-store=“eventStore” />
axon:selectors
<axon:package prefix=“com.giffdiff.project.view”/>
</axon:selectors>
</axon:cluster>
<axon:cluster id=“invitationMailerCluster” order=“0”>
axon:selectors
<axon:package prefix=“com.giffdiff.identity.usercommunication”/>
<axon:package prefix=“com.giffdiff.project.usercommunication”/>
</axon:selectors>
</axon:cluster>
This works fine for the views (found in the *.view sub packages)
The events are not re-send to the AggregateRoot instance though, this instance contains some event handling like: (Aggregate is named UserAccount)
@EventHandler
def on(e : AccountCreated) {
log.debug(“called “ + e)
id = e.accountId
email = e.email
fullName = e.name
bcryptedPassword = e.password
}
that expects the id, email, fullName and password to be kept with the state of the specific instance of this aggregate.
Now, after startup, it seems that these events were not called and the internal state of the aggregate is not as it should be.
Till now, my assumptions comes from the debug log message that is shown when you have the application in normal running mode and a command fires an AccountCreated event (CreateAccount command), the log message is shown.
When you re-start the application (Event stored via JPA in mysql, JVM process gone and created again), the log message is not shown.
Does this help to explain the issue ?
Kind regards,
Olger