![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
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.Stop the server by using the shutdown command in the administration tool:To enable multicast in the server, set the multicast property to enabled in the tibemsd.conf configuration file:To create a multicast channel, add the following definition to the multicast channels configuration file, channels.conf:In the administration tool, use the show topics command to confirm that multicastTopic is multicast-enabled as indicated by a ‘+’ in the M column:In order to make a topic multicast-enabled it must be associated with a multicast channel through its channel property.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:
1.
2. Enter setup to set the environment and classpath:
3. Execute the tibjmsMsgConsumer client to assign user1 as a subscriber to the multicastTopic topic with a Session acknowledgment mode of NO_ACKNOWLEDGE:
4. In the administration tool, use the show consumers command to confirm that user1 is a multicast subscriber to multicastTopic as indicated by a + in the M column:
1.
2. Enter setup to set the environment and classpath:
3. Execute the tibjmsMsgProducer client to direct user1 to publish some messages to the multicastTopic topic:
In this example, user1 is both a publisher and subscriber.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |