Oleg
Oleg
Thanks to issue 72 I found that actor receives JObject not ChatMessage.Event: ``` {{ "Case": "Event", "Fields": [ { "$id": "1", "$type": "Program+ChatEvent, akka-persist", "Message": "New session started 20.05.2018 12:31:02"...
@Horusiath thank you. For now I made the following hack: ``` let! (msg: obj) = mailbox.Receive() match msg with | :? ChatMessage as cm -> ... | :? JObject as...
@Horusiath, I've just pushed the sample project with another workaround - provide custom event adapter which properly encodes type of the event: ```fsharp type EventAdapter(__ : Akka.Actor.ExtendedActorSystem) = interface Akka.Persistence.Journal.IEventAdapter...
@Horusiath, @object now I could state the issue sits inside Akka.NET serializer. As I noticed above `$type` attribute/property is pushed down to a `Fields` which has its good reasons. My...
Final step is checking NewtonSoft behavior which Akka NewtonsoftJsonSerializer relies on: ```fsharp open Newtonsoft.Json type ChatEvent = { Message : string } type ChatCommand = | Message of string |...
This is the easiest part. Here's the builder: ``` fsharp type ObjectDefBuilder, value) = {f with Description = Some value} [] member this.AddField(f: ObjectDefinition) = {f with FieldsFn = lazy...
No, you are doing it right. According to https://www.rfc-editor.org/rfc/rfc8794.html#name-vint-examples the value of 0 is encoded with 1 octet: 1xxx xxxx where xxxxxxx = 0 results in 0x80.
Well, section 6.1 (https://www.rfc-editor.org/rfc/rfc8794.html#section-6.1) is even more interesting. If I understand it correctly long/ulong values should use length of 1 or more. I could provide WriteDefault(VInt elementId) for legacy behavior...
I suppose it's redundant. Which one would be used if I write code like this `Write(DurationElementId, null)`? Besides that we don't care about backword compabitility so both options look the...
Hm… The good point is that it’s backward compatible, i.e. 0 will be written as 80. Does it work well for your scenario: you will have to pass a different...