Export (0) Print
Expand All

MessageQueue.MulticastAddress Property

Note: This property is new in the .NET Framework version 2.0.

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)

public string MulticastAddress { get; set; }
/** @property */
public String get_MulticastAddress ()

/** @property */
public void set_MulticastAddress (String value)

public function get MulticastAddress () : String

public function set MulticastAddress (value : String)

Property Value

A String that contains a valid multicast address (in the form shown below) or a null reference (Nothing in Visual Basic), which indicates that the queue is not associated with a multicast address.

Exception typeCondition


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 to, 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 a null reference (Nothing in Visual Basic), as this will result in a ArgumentNullException.

The following table shows whether this property is available in various Workgroup modes.

Workgroup mode


Local computer


Local computer and direct format name


Remote computer


Remote computer and direct format name


  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

© 2015 Microsoft