Ok, thanks.
I do indeed have an enum that identifies (in this case) the type of
endpoint (IP, Sms, etc...).But because each different type of endpoint
has different attributes about it that also need to be communicated,
we chose the natural object -oriented approach (inheritance) rather
than use a dictionary. The message itself looks as follows.
public class ReceivedDataMessage
{
public DateTime ReceivedDateTime { get; set; }
public int BindingDefinitionId { get; set; }
public EndPointInfo DeviceEndPointInfo { get; set; }
public byte[] Data { get; set; }
}
The endpoint in the message could be any kind of endpoint and the type
and attributes need to be communicated. There is a lot of overhead
involved in parsing the data, which is why it was offloaded to another
service as it doesn't need to be handled in real time.
We do know all the types ahead of time as we have the ability to share
the Messages assembly which takes no references to the rest of the
domain model.
As far as creating the serializer, that doesn't seem like a huge issue
-> just implement IMessageSerializer. However, what does have me a
little confused is to how to get the Msmq endpoints to use this
serializer... I'm using the windsor container for IoC.
Thanks for your help Chris...