tags:

views:

47

answers:

1

It is possible have one MSMQ queue in one machine and read masseges from that queue from another machine?

If yes, what is the path i should use in Create method from MessageQueue class?

Thanks

A: 

It's definitely possible to read messages from a queue on another machine, depending on which version of Windows you're running. It seems you're also asking if it's possible to create message queues on another machine. According to the documentation here, you simply use the format "MachineName\Private$\QueueName" for a private queue or "MachineName\QueueName" for a public queue.

In my experience, getting the permissions set up to allow remote message queue reading is a bit tricky; getting the right permissions set for allowing the creation of message queues might be even trickier. You may want to consider using pre-created message queues.

Jacob
It is possible with MSMQ, but we had to drop MSMQ for Apache ActiveMQ due to an issue where remote MSMQ clients would stop receiving messages periodically. The messages were posted to the queue fine, but they wouldn't ever be available to the remote clients.The format shown by Jacob is correct.
consultutah
MSMQ was pretty flaky before the version that comes with Windows Server 2008, but after that, I was pretty happy with how it works. Zé Carlos, you ought to tell us which operating systems you're using.
Jacob
Thanks for your answer. I am using Win XP, so i think it has MSMQ 3.0. I thought private queues were only accessible in local machine.. Then, what's the difference between private and public queues?
Zé Carlos
It has to do with whether the queue can be looked up in Active Directory. I always dealt with known MSMQ paths, so I never needed public queues, myself. Bummer that you're using XP because there's more restrictions on reading from remote queues. See http://msdn.microsoft.com/en-us/library/ms699854(VS.85).aspx.
Jacob