def publish(self, topic, data, options=None): service = yield self.getService() try: ret = yield service.publish(topic, data, options=options) except TransportLost: log.err(failure.Failure(), "while publishing event " + topic) return defer.returnValue(ret)