public NATSMessageConsumer(IOptions <NATSConsumerOptions> options, ILogger <NATSMessageConsumer <TData> > logger,
                            IApplicationNameService applicationNameService, INATSClientFactory natsClientFactory)
 {
     _options = options.Value;
     _logger  = logger;
     _applicationNameService = applicationNameService;
     _client = natsClientFactory.From(_options);
 }
 public NATSMessagePublisher(
     IOptions <NATSBaseOptions> options,
     INATSClientFactory natsClientFactory,
     CloudEventFormatter cloudEventFormatter,
     IOptions <PublisherOptions> publisherOptions)
 {
     _options             = options.Value;
     _client              = natsClientFactory.From(_options);
     _cloudEventFormatter = cloudEventFormatter;
     _publisherOptions    = publisherOptions.Value;
 }