public virtual async Task IncluirProcesso(T processo) { var licenca = _gerenciadorDeLicenca.ObterLicenca(); processo.Licenca = _gerenciadorDeLicenca.GerarHashDaLicenca(licenca); processo.Tipo = typeof(T).FullName; processo.Assembly = typeof(T).Assembly.FullName; var processoSerializado = JsonSerializer.Serialize <T>(processo); var servidor = licenca.ServidorKafka; var topic = "EGF.Processos"; var config = new ProducerConfig { BootstrapServers = servidor }; using var producer = new ProducerBuilder <Null, string>(config).Build(); await producer.ProduceAsync(topic, new Message <Null, string> { Value = processoSerializado }).ConfigureAwait(false); }
protected FabricaDeConexao(IGerenciadorDeLicenca gerenciadorDeLicenca) { Licenca = gerenciadorDeLicenca.ObterLicenca(); }