ISerializer - rebus-org/Rebus GitHub Wiki
This one is responsible for serializing and deserializing messages.
It should be capable of transforming a Message
instance, containing a headers dictionary and a message in the form of a .NET object, into a TransportMessage
, which is just a headers dictionary and a byte[]
.
The reverse process consists of transforming a received TransportMessage
back into the same Message
instance as before.
Possibly tricky
Even though message serialization in some ways can be seen as a trivial process, it has a pretty big impact on how your system can be operated and which features are available. Take for instance the following stuff:
- big object graphs - how much data can you send/receive, given the serialized format and the transport you're using?
- inheritance hierarchies - can you serialize subclasses and deserialize them again?
- versioning - how does your serializer handle missing fields in destination class or missing fields in serialized format?
and there's probably more...