MessageQueue.MulticastAddress Property
Introduced in MSMQ 3.0. Gets or sets the multicast address associated with the queue.
Namespace: System.Messaging
Assembly: System.Messaging (in System.Messaging.dll)
[MessagingDescriptionAttribute("MQ_MulticastAddress")] public string MulticastAddress { get; set; }
Property Value
Type: System.StringA String that contains a valid multicast address (in the form shown below) or null, which indicates that the queue is not associated with a multicast address.
<address>:<port>
| Exception | Condition |
|---|---|
| PlatformNotSupportedException | MSMQ 3.0 is not installed. |
The MulticastAddress property is used to associate a non-transactional queue with a multicast address that can be used when sending messages. You cannot associate a transactional queue with a multicast address. When the sending application sends messages to a multicast address, Message Queuing sends a copy of the message to every queue associated with that address.
IP multicast addresses must be in the class D range from 224.0.0.0 to 239.255.255.255, which corresponds to setting the first four high-order bits equal to 1110. However, only certain ranges of addresses in this range are unreserved and available for sending multicast messages. For the latest list of reserved multicast addresses, see the Internet Assigned Number Authority (IANA) Internet Multicast Addresses Web page. There are no restrictions on the port number.
If several source computers are sending multicast messages and you want a specific queue to receive messages from only one source computer, each source computer must send messages to a different combination of IP address and port number.
To dissociate a queue from a multicast address, set the MulticastAddress property to a zero-length string. Do not set it to null, as this will result in a ArgumentNullException.
The following table shows whether this property is available in various Workgroup modes.
Workgroup mode | Available |
|---|---|
Local computer | Yes |
Local computer and direct format name | Yes |
Remote computer | No |
Remote computer and direct format name | No |
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.