Comment this line out and the ExecuteMessage works fine. The problem is with it set to true, the Body in IMessage is a serialised string and so can’t be resolved.
Is this expected? Should it deserialise the Body of IMessage?
TypeInfo is only emitted when it’s needed (e.g. when using interfaces or object types) so using JsConfig.ExcludeTypeInfo = true should be a red flag as the TypeInfo you’re trying to suppress is usually needed by .NET Clients in order to serialize JSON into .NET Types.
It’s required by Message.Body which needs to be an object in order to be a generic message container that can hold any Request DTO.
Would it be possible to include a version of RegisterHandler that has the “noOfThreads” parameter? Right now it has to be cast to the specific service type (AWS, Redis, Rabbit) but they all seem to support it. Except for InMemory, but isn’t that just a development version?
It’s likely you didn’t want the type info omitted to Ajax clients for Request DTOs that have interface or object properties, the solution here is to always use concrete Types.
How could it infer the Type? The Type Info is exactly what’s used to specify what Type the anonymous object should be deserialized into. We need to deserialize an annonymous Message into a Typed Message with a Typed Request DTO which is why the Type Info is needed.
The new APIs was added to IMessageService in this commit. This change is available from v4.5.13 that’s now available on MyGet.