MessageQueue.MulticastAddress Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Introduced in MSMQ 3.0. Gets or sets the multicast address associated with the queue.
public:
property System::String ^ MulticastAddress { System::String ^ get(); void set(System::String ^ value); };
[System.Messaging.MessagingDescription("MQ_MulticastAddress")]
public string MulticastAddress { get; set; }
[<System.Messaging.MessagingDescription("MQ_MulticastAddress")>]
member this.MulticastAddress : string with get, set
Public Property MulticastAddress As String
Property Value
A 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>
- Attributes
Exceptions
MSMQ 3.0 is not installed.
Remarks
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 |