Im new to message queues and im trying to make the decision between using
private or public queues.
My assumption is that private queues can only be accessed from the local
machine and that if I want a Message Queue Server to expose queues that
remote clients can use they must be public.
Is this the case?
Chris
A simple rule of thumb is "use private queues unless you have a good reason
not to".
The flexibility of a public queue comes at a price. You need to store the
public info in a database (the SQL based MQIS for MSMQ 1.0, Active Directory
for MSMQ 2.0), and you have the overhead of accessing and updating that
database. Furthermore, while private queues work in all MSMQ environments,
public queues do not work on Workgroup mode systems.
> My assumption is that private queues can only be accessed from the local
> machine and that if I want a Message Queue Server to expose queues that
> remote clients can use they must be public.
That's not the case. Public and private queues are identical in how they
are written to and read from. The only difference between them is that the
public queue has some extra options for how it is located and opened.
Both public and private queues can be opened using the pathname - e.g.,
"host\publicq" or "host\private$\notpublicq" and both types can be opened
using a Format Name - PUBLIC or DIRECT format names for public queues
PRIVATE or DIRECT format names for private queues. Both types of queue can
be opened by both local and remote programs. All these mechanisms require
that you know the location of the queue, either by host name, ip address or
machine guid.
The added capability public queues have is that they can be searched for
using LookupQueue or the MQLocateXXX functions. Because public queues are
published in the Active Directory (or MQIS) you can find those queues by
searching the database for information. For example, you can find all
queues with a certain label, or a certain service type (which is a GUID).
This allows you to build queuing applications with a certain amount of
location independence. Instead of opening queue X at host Y you can open
the queue whose label is "OpenMe".
For some applications, this added capability is really useful. For other
applications however it is just unnecessary overhead. For instance, you
cannot use LookupQueue etc while disconnected from the network, or while
running on a system in Workgroup mode. In those cases, you have to have
already done the lookup and stored off the format name (you also can't use
path name to open a remote queue when offline or in workgroup mode).
Thanks very much for your advice - that has cleared things up for me a great
deal
Chris
"Frank Boyne" <frank...@unisys.com> wrote in message
news:#WuRQsv6BHA.2516@tkmsftngp04...