I have implemented two microservices with spring boot axon.
Microservice A contains UserAggregate.
Microservice B contains UserAggregate.
Microservice A able to generate below 2 events in UserAggregate.
1) UserCreatedEvent stored in the event store with 0 sequence of type UserAggregate
2) UserUpdatedEvent stored in the event store with 1 sequence of type UserAggregate
Now, Microservice B would like to generate another event on the same UserAggregate, the event store action is generating from B service
3) UserDeletedEvent need to store in the event store with 2 sequence of type UserAggregate
But I am getting below exception, how can I solve this exception ?org.axonframework.serialization.UnknownSerializedTypeException
2019-09-17 21:46:41.829 WARN 1756 --- [onPool-worker-2] o.a.c.gateway.DefaultCommandGateway : Command 'com.ms.commands.UserDeletedCommand' resulted in org.axonframework.serialization.UnknownSerializedTypeException(Could not deserialize a message. The serialized type is unknown: com.ms.events.UserCreatedEvent (rev. null))
I am using axon 3.3.3 version with spring boot 2. and I am using JdbcEventStorageEngine.
@Bean
public JdbcEventStorageEngine eventStorageEngine(ConnectionProvider connectionProvider) {
return new JdbcEventStorageEngine(connectionProvider, NoTransactionManager.INSTANCE);
}
In application.properties
axon.serializer.general=jackson
axon.serializer.events=jackson
axon.serializer.messages=jackson