Hash topicForEvent(String name) { final e = findEventByName(name); if (e == null) { throw Exception('Unknown event $name'); } return e.asTopic; }