In this example, you will enable multicast in the EMS server and configure a multicast channel, over which the server can broadcast multicast messages. You will also create a multicast-enabled topic named
multicastTopic and associate it with the multicast channel, allowing subscribers to receive messages published to
multicastTopic over multicast.
Multicast channels can only be configured statically by modifying the configuration files. There are no commands in the administration tool to configure multicast channels.
Stop the server by using the shutdown command in the administration tool:
The EMS server broadcasts messages to consumers over multicast channels. Each channel has a defined multicast address and port. Messages published to a multicast-enabled topic are sent by the server and received by the subscribers on these multicast channels.
In the administration tool, use the show topics command to confirm that
multicastTopic is multicast-enabled as indicated by a ‘+’ in the M column:
Creating a multicast subscriber follows the same steps as creating a non-multicast subscriber, except that a multicast subscriber requires a session acknowledgment mode of
com.tibco.tibjms.Tibjms.NO_ACKNOWLEDGE.
To start user1 as a multicast subscriber:
Setting up a client to publish multicast message is no different from setting up a client to send publish and subscribe messages. Because the topic is enabled for multicast in the EMS server, the message producer does not need to follow any additional steps.