akkadotnet-cluster-workshop icon indicating copy to clipboard operation
akkadotnet-cluster-workshop copied to clipboard

MatchingEngine it is not recovered from a snapshot ?

Open pliolis opened this issue 5 years ago • 3 comments

https://github.com/petabridge/akkadotnet-cluster-workshop/blob/bb7df6bd42c0dea90ae8defbc68140358afa61f2/src/Akka.CQRS.Matching/MatchingEngine.cs#L66

Hi, are we losing asks and bids here?

pliolis avatar Aug 24 '20 20:08 pliolis

Yes, absolutely - had to disable that serialization when using standard MongoDB polymorphic representation. If I followed through with using the Protobuf serialization all the way through then that would not be an issue.

Aaronontheweb avatar Aug 24 '20 20:08 Aaronontheweb

Aaron, you mean something like TradeEventSerializer but for the MatchingEngine in conjunction with the appropriate configuration like https://getakka.net/articles/persistence/custom-serialization.html

pliolis avatar Aug 24 '20 21:08 pliolis

Yep! That's correct - we did that with some of the events here: https://github.com/petabridge/akkadotnet-cluster-workshop/blob/dev/src/Akka.CQRS/Serialization/TradeEventSerializer.cs

For the pricing engine, I actually defined all of the protos and compiled them here: https://github.com/petabridge/akkadotnet-cluster-workshop/tree/dev/src/Akka.CQRS.Pricing/Serialization/Proto

But I never got around to writing the full serializer - ran short on time before we had to present this live the very first time.

Aaronontheweb avatar Aug 24 '20 22:08 Aaronontheweb