Moving message contracts between namespaces causes message bus deserialisation to fail #7795
Closed
1 task done
Labels
kind/bug
This issue represents a verified problem we are committed to solving
Team
Severity
This is likely to block many customers if it's released.
Version
Found in 2022.4.2848 because of namespace moves but the actual bug is from much earlier.
Latest Version
I could reproduce the problem in the latest build
What happened?
The message bus serialiser is configured to support serialisation of polymorphic types. This is what we want; however, it uses
Newtonsoft.Json
's default$type
JSON property which includes the assembly-qualified full name of the type it's serialising. This is troublesome because:Ultimately, this results in errors like this:
Reproduction
MachineCreatedEvent
or similar).Error and Stacktrace
More Information
No response
Workaround
As a bit of a brutal workaround, it's possible to just delete all of the events in the message bus's table.
UPDATE MessageBusCursor SET SequenceNumber = (SELECT MAX(SequenceNumber) FROM MessageBusEvent);
This will ensure that the server can at least serialise and deserialise new events that it writes itself
The text was updated successfully, but these errors were encountered: