File tree Expand file tree Collapse file tree
src/Motor.Extensions.Hosting.Kafka Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,12 +47,17 @@ public KafkaMessageConsumer(
4747 CloudEventFormatter cloudEventFormatter
4848 )
4949 {
50- _logger = logger ?? throw new ArgumentNullException ( nameof ( logger ) ) ;
50+ ArgumentNullException . ThrowIfNull ( logger ) ;
51+ ArgumentNullException . ThrowIfNull ( config . Value ) ;
52+ ArgumentNullException . ThrowIfNull ( applicationNameService ) ;
53+ ArgumentNullException . ThrowIfNull ( cloudEventFormatter ) ;
54+
55+ _logger = logger ;
5156 _applicationLifetime = applicationLifetime ;
52- _applicationNameService =
53- applicationNameService ?? throw new ArgumentNullException ( nameof ( applicationNameService ) ) ;
57+ _applicationNameService = applicationNameService ;
5458 _cloudEventFormatter = cloudEventFormatter ;
55- _options = config . Value ?? throw new ArgumentNullException ( nameof ( config ) ) ;
59+ _options = config . Value ;
60+
5661 _consumerLagSummary = metricsFactory ? . CreateSummary (
5762 "consumer_lag_distribution" ,
5863 "Contains a summary of current consumer lag of each partition" ,
You can’t perform that action at this time.
0 commit comments