【发布时间】:2011-11-17 22:33:28
【问题描述】:
我计划让一个队列接收大约 100 种不同的消息类型。
如果我只有两种不同的类型,我会做这样的事情
MessageQueue queue = new MessageQueue(_queue); queue.Formatter = new XmlMessageFormatter(new Type[] { typeof(CreateReportComand), typeof(CreateReportComand2)});
向 XmlMessageFormatter 传递一个约 100 种类型的数组是不是很疯狂。如果不是,检查收到的消息以决定如何处理它的最佳方法是什么?
【问题讨论】:
标签: msmq