Emlyn (pentacle) wrote:
> I didn't know this. I'm just a newbie to COM, etc, after all. How well
> MSMQ mix with COM? Do I deal directly with COM/ActiveX objects (ie: Com
> object A sends a message to Com object B)? Or is it outside of the COM
> model, meaning that things get messy?
MSMQ is intended to be used by COM objects, so it all works together pretty
well. The only real problem is that it was designed with a C++ mentality, so
it tends to be more complicated than it really needs to be.
The basic model is that you set up message queues in different machines, and
each COM object 'subscribes' to one or more queues. Then and program on the
network can send messages to any message queue, using the MSMQ COM
interface. When a message arrives in a queue MSMQ generates an event that
signals any 'subscribed' COM objects that there is a message waiting.
You can do some really neat things with the system, like sending messages
when the network is down (they just pile up until the connection comes back,
at which point they all get sent), or interfacing with other message queue
systems. However, you have to write your own code to handle dead letters
(i.e. method calls that can't be processed) and serializing data (a message
body can be text, almost any primitive data type, a byte array, or a
persistent ActiveX object, but it can't be a variant or an array of anything
except bytes, so you end up having to do some work if you're object have
The best book I've seen on using this kind of setup is:
I give it about a 5 on a scale of 1-10, but then I rarely rate anything
above a 7.
This archive was generated by hypermail 2b29 : Thu Jul 27 2000 - 14:10:29 MDT