> Overview of Multicast
> Multicast is a messaging model that broadcasts messages to many consumers at once, as opposed to sending copies of a message to each subscribing consumer individually. TIBCO Enterprise Message Service uses Pragmatic General Multicast (PGM) to broadcast messages published to multicast-enabled topics over an existing network. Messages sent to topics that are not multicast-enabled are delivered to the message consumer using TCP.
> The server sends multicast messages over a multicast channel. Each multicast-enabled topic is associated with a channel. The channel determines the multicast port and multicast group address to which the server sends messages.
> The multicast message is received by a multicast daemon running on the same computer with the message consumer. When an EMS client subscribes to a multicast-enabled topic, it automatically connects to the multicast daemon. The multicast daemon begins listening on the channel associated with that topic, receives any broadcast messages, and delivers them to subscribed clients.
> Figure 20 shows the communication flow between a multicast message consumer, EMS server, and multicast daemon.
> Figure 20 Multicast message consumer creation
> The following describes the multicast message consumer creation process:

> 1. | The EMS client connects to the EMS server and subscribes to one or more multicast-enabled topics.

> 2. | The EMS server sends a reply to the client, including instructions and configuration information for the multicast daemon.

> 3. | The client connects to the multicast daemon and passes the configuration information from the server. The multicast daemon then begins listening for multicast messages from the server.

> 4. | The server begins broadcasting messages, which the multicast daemon receives.

> 5. | The multicast daemon delivers the messages to the client.

> The client will continue to receive non-multicast messages directly from the server.
> When to Use Multicast
> Because multicast reduces the number of operations performed by the server, and reduces the amount of bandwidth used in the publish and subscribe model, multicast is highly scalable.
> Figure 21 shows how using multicast can reduce the amount of bandwidth used to send a message. Where publish and subscribe messaging creates a copy of a published message for each message consumer, multicast broadcasts the message only once. Multiple multicast daemons listening on the channel receive the same broadcast.
> Figure 21 The benefits of multicast
> Although multicast can reduce the network resources used by the server, it is not the best messaging model for every system. Multicast offers last-hop delivery only; it cannot be used to send messages between servers. However, messages sent to multicast-enabled topics are still delivered to other subscribed servers using the standard TCP connection.

> | Multicast does not guarantee message delivery. Messages requiring a high degree of reliability should not use multicast.
> | The multicast daemon and message consumer always reside on the same machine, and PGM is used to deliver the broadcast message from EMS server to the daemon. Because there is no security on PGM, multicast should not be used in applications where security is a priority.

> Requirements
> In order to use multicast in your EMS messaging application, the following requirements must be met:

> ● | The EMS server must be configured for multicast:

> − | The server must be enabled for multicast.

> − | Multicast channels must be configured.

> − | The desired topics must be multicast-enabled by associating them with a multicast channel. Multicast is not compatible with queues.

> See Configuring Multicast for more information about configuring multicast.

> ● | The multicast-enabled message consumer must be created using the NO_ACKNOWLEDGE mode. See Message Acknowledgement for more information.

> ● | The multicast daemon must be running on the same computer as the subscriber. See Starting the Multicast Daemon for more information.

> Backwards Compatibility
> Multicast is backwards compatible, and can be used in applications where not all EMS clients are using the same version of TIBCO Enterprise Message Service. The EMS sever and any clients that wish to receive messages over multicast must be Software Release 5.0 or later.
> Multicast is configured primarily in the EMS server, and is largely invisible to EMS clients. Message producers do not need to be enabled for multicast in order to send multicast messages, because topics are multicast-enabled in the server. However, clients are multicast-enabled by default.
> Clients that are not multicast-enabled, either because multicast has been disabled or because the client uses a release of EMS earlier than 5.0, will receive messages from the server over the TCP connection, even if the message topic is multicast-enabled.

Copyright © TIBCO Software Inc. All Rights Reserved.