Rebus has its own message formatter, RebusTransportMessageFormatter
, which is the thing that the MSMQ client delegates the actual reading/writing of the MSMQ Message
to.
Check out the Read
and Write
methods in the formatter - they contain the logic that Rebus is using when using MSMQ to transfer messages, regardless of the chosen serializer.
If Rebus is to be used directly with an existing MSMQ solution, the existing solution must be capable of serializing/deserializing messages into the body the same way as Rebus does.
Note also how Rebus uses the Extension
property to store headers - this probably means that you'll be unable to send a message from your existing MSMQ solution to Rebus, because Rebus will assume that there's an Extension
stream of bytes that can be interpreted as an UTF7-encoded, serialized dictionary of header values.
Hope this helps :)