You are here: Part 2: Core Concepts > Working with DDS Domains > DomainParticipant QosPolicies > TRANSPORT_MULTICAST_MAPPING QosPolicy (DDS Extension)


The multicast address on which a DataReader wants to receive its data can be explicitly configured using the TRANSPORT_MULTICAST QosPolicy (DDS Extension). However in systems with many multicast addresses, managing the multicast configuration can become cumbersome. The TransportMulticastMapping QosPolicy is designed to make configuration and assignment of the DataReader's multicast addresses more manageable. When using this QosPolicy, the middleware will automatically assign a multicast receive address for a DataReader from a range by using configurable mapping rules.

DataReaders can be assigned a single multicast receive address using the rules defined in this QosPolicy on the DomainParticipant. This multicast receive address is exchanged during simple discovery in the same manner used when the multicast receive address is defined explicitly. No additional configuration on the writer side is needed.

Mapping within a range is done through a mapping function. The middleware provides a default hash (md5) mapping function. This interface is also pluggable, so you can specify a custom mapping function to minimize collisions.

To use this QosPolicy, you must set the kind in the TRANSPORT_MULTICAST QosPolicy (DDS Extension) to AUTOMATIC.

This QosPolicy contains the member in .



Field Name




A sequence of multicast communication settings, each of which has the format shown in .



Field Name


char *


A string containing a comma-separated list of IP addresses or IP address ranges to be used to receive multicast traffic for the entity with a topic that matches the topic_expression.

See Formatting Rules for Addresses.

char *


A regular expression used to map topic names to corresponding addresses.

See SQL Extension: Regular Expression Matching.



Optional. Defines a user-provided pluggable mapping function. See .




Field Name


char *


Specifies a dynamic library that contains a mapping function.

You may specify a relative or absolute path.

If the name is specified as "foo", the library name on Linux systems will be; on Windows systems it will be foo.dll.

char *


Specifies the name of a mapping function in the library specified in the above dll.

The function must implement the following interface:

int function(const char* topic_name, int numberOfAddresses);

The function must return an integer that indicates the index of the address to use for the given topic_name. For example, if the first address in the list should be used, it must return 0; if the second address in the list should be used, it must return 1, etc.

Formatting Rules for Addresses


This QoS policy configures the multicast ranges and mapping rules at the DomainParticipant level. You can configure a large set of multicast addresses on the DomainParticipant.

In addition, you can configure a mapping between topic names and multicast addresses. For example, topic "A" can be assigned to address and topic "B" can be assigned to address

This configuration is quite flexible. For example, you can specify mappings between a subset of topics to a range of multicast addresses. For example, topics "X", "Y" and Z" can be mapped to [,], or using regular expressions, "X*" and "B-Z" can be mapped to a sub-range of addresses. See SQL Extension: Regular Expression Matching.


This QosPolicy cannot be modified after the DomainParticipant is created.

Related QosPolicies

Applicable DDS Entities

System Resource Considerations

See System Resource Considerations.

© 2016 RTI