Hello together,
in one of our current projects, we have the folloging setup:
spring boot maven @ 1.5.6
axonframework maven @ 3.0.6
mongodb as event storage and mongo db as read model store
JacksonSerializer configured with the following object mapper settings:
spring.jackson.serialization.write-dates-as-timestamps=false
spring.jackson.deserialization.fail-on-unknown-properties=false
spring.jackson.deserialization.accept-single-value-as-array=true
spring.jackson.default-property-inclusion=non_null
Problem:
Some events are stored around the same second, one with 0 milliseconds and
the second some milliseconds later:
e.g. from the mongodb
{ "id:" "event1", "aggregateIdentifier": "42", "sequenceNumber": 0 "timestamp": "2017-07-17T09:08:50Z" ... }
and
{ "id:" "event1", "aggregateIdentifier": "42", "sequenceNumber": 1 "timestamp": "2017-07-17T09:08:50.139Z" ... }
Result:
In our event handlers in the read model using a tracking processor, the event are delivered in the
wrong order, the event 1 BEFORE the event 0.
Expected Result:
Event 0 before event 1
We don’t know exactly how the axon tracking processor determines the order of the events to replay,
but it seems that it has some problems with serialized timestamp. Is this maybe a wrong configuration
while serializing the date stamp or while deserializing.
Any help appreciated
Thanks in advance
Benjamin