private ulong GetMessageId(IDictionary<string, Topic> topics, string key) { Topic topic; if (topics.TryGetValue(key, out topic)) { return GetMessageId(topic); } return 0; }