Azure / durabletask

Durable Task Framework allows users to write long running persistent workflows in C# using the async/await capabilities.
Apache License 2.0
1.47k stars 287 forks source link

Revise serialization of entitymessages #972

Closed sebastianburckhardt closed 9 months ago

sebastianburckhardt commented 9 months ago

Revises how to avoid double serialization, and exposure to application-defined serialization settings, for entity message serialization. This is a challenge because orchestrators that send messages to entities have to do so by calling SendEvent, which serializes the content using the application-defined serializer.

Previously, double serialization was avoided by serializing to JObject. But that is hacky and does not actually work with STJ.

Instead we now revise the SendEvent implementation in DurableTask.Core directly, so it can detect EntityMessageEvents and use the internally defined serialization mechanism.