Skip to main content
RSS feed Subscribe to feed

 

How to Use EMS for Event Driven Updates

Code example implementing a message publisher for event driven updates of a Spotfire Web Player analysis.

This specific example uses the TIBCO Enterprise Message Service (EMS) C# client library.

TopicConnectionFactory factory = new TopicConnectionFactory(emsServerUrl);
TopicConnection connection = factory.CreateTopicConnection(emsUserName, emsPassword);
TopicSession session = connection.CreateTopicSession(false, Session.AUTO_ACKNOWLEDGE);
Topic topic = session.CreateTopic(topicName); // Same topic name as configured in web.config
TopicPublisher publisher = session.CreatePublisher(topic);
MapMessage message = session.CreateMapMessage();
message.SetString("Path", "/path/to/analysis");
message.SetString("ClientUpdate", "automatic");
publisher.Publish(message);