コード例 #1
0
ファイル: KafkaListener.cs プロジェクト: esilean/bev-shopping
        public KafkaListener(
            IServiceScopeFactory serviceFactory,
            IOptions <KafkaProducerOptions> producerOptions,
            IOptions <KafkaConsumerOptions> consumerOptions)
        {
            _kafkaProducerOptions = producerOptions.Value;
            _kafkaConsumerOptions = consumerOptions.Value;
            _serviceFactory       = serviceFactory;

            _producerConfig = ConfigProducer();
            _consumerConfig = ConfigConsumer();

            _topics = _kafkaConsumerOptions.Topics.Split(",");
        }