protected AbstractTopicConsumerBuilder(string topic, Type messageType, MessageBusSettings settings)
        {
            Topic       = topic;
            MessageType = messageType;
            Settings    = settings ?? throw new ArgumentNullException(nameof(settings));

            ConsumerSettings = new ConsumerSettings
            {
                Topic       = topic,
                MessageType = messageType
            };
            Settings.Consumers.Add(ConsumerSettings);
        }
        protected AbstractTopicConsumerBuilder(string topic, Type messageType, MessageBusSettings settings)
        {
            Topic       = topic;
            MessageType = messageType;
            Settings    = settings;

            ConsumerSettings = new ConsumerSettings
            {
                Topic       = topic,
                MessageType = messageType
            };
            Settings.Consumers.Add(ConsumerSettings);
        }
        protected GroupConsumerBuilder(string group, string topic, MessageBusSettings settings)
        {
            Group = group;

            var consumerSettingsExist = settings.Consumers.Any(x => x.Group == group && x.Topic == topic);

            Assert.IsFalse(consumerSettingsExist,
                           () => new ConfigurationMessageBusException($"Group '{group}' configuration for topic '{topic}' already exists"));

            ConsumerSettings = new ConsumerSettings
            {
                Group       = group,
                Topic       = topic,
                MessageType = typeof(TMessage)
            };
            settings.Consumers.Add(ConsumerSettings);
        }