Esempio n. 1
0
        public async Task AutoDiscoverEventsAsync(ServerEventMessage eventMessage)
        {
            // Check to see if this Topic Already Exists
            var topics = await metadataStore.GetTopicsAsync();

            if (!topics.Any(t => t.Equals(eventMessage.Topic, StringComparison.OrdinalIgnoreCase)))
            {
                logger.LogInformation(nameof(DefaultMetadataService) + " discovered a new Event Topic");
                await metadataStore.AddTopicAsync(eventMessage.Topic);
            }
        }