public hms.MessageInterfacePrx getEventPublisher(string topicName) { // Get the topic's publisher object, using towways IceStorm.TopicPrx topic = getTopic(topicName); Ice.ObjectPrx publisher = topic.getPublisher(); return(hms.MessageInterfacePrxHelper.uncheckedCast(publisher)); }
public void subscribeEvent(Holon holon, string topicName) { IceStorm.TopicPrx topic = getTopic(topicName); Dictionary <string, string> qos = new Dictionary <string, string>(); qos["reliability"] = ""; //#"" and "ordered" are the only possibilities see doc qos["retryCount"] = "-1"; // #-1 means to never remove a dead subscriber from list try { topic.subscribeAndGetPublisher(qos, holon.Proxy); } catch (IceStorm.AlreadySubscribed) { logger.Info("Allready subscribed to topic, that is ok"); } logger.Info(holon.Proxy + " subscribed to " + topicName); }