Dec 21, 2011
I am trying to use MessageQueues to notify users of an application of data changes using the Multicast feature, but can't get it to work : the workstation that sends the message does receive it, but none of the other running workstations seem to catch the sent message.Sending messages is done as follows :
View 1 Replies
Dim sendQueue As New Messaging.MessageQueue("FormatName:MULTICAST=18.104.22.168:8001")
Dim message As New Messaging.Message("message body...")
And receiving them :
Dim receiveQueue As New Messaging.MessageQueue(".private$myQ")
receiveQueue.MulticastAddress = "22.214.171.124:8001"
So I'm obviously missing something, and I can't seem to find any good ressources on multicasting with MSMQ 3.0 in .NET.Also, what is not clear is wether I should use a local queue per workstation, or one single remote queue on a server to multicast messages ? And does using the receive method on multicast messages purge them from the queue ?On a side note, all workstations are on the same subnet, and all have MSMQ 3.0 installed.
Despite what the Queue properties dialog says, permissions are NOT totally ignored on unauthenticated queues, at least when using multicasting. If you want your queue to receive multicast messages, it must give to 'ANONYMOUS_LOGON' the right to 'Send messages'. Otherwise, multicast messages are just discarded without any notice in event logs or whatsoever (unless I missed something).
On Win7 stations (XP stations seem to do fine, which is what pointed me to the actual problem), queues created through code do not have such permissions, and hence must be manually set after creating the queue :
Dim msgQ = Messaging.MessageQueue.Create(queueName)
It would seem that internally, MSMQ uses that account to write multicast messages to unauthenticated queues.