예제 #1
0
        public static KafkaInstance DeployNew(KafkaSettings settings, ILog log, bool started = true)
        {
            KafkaInstance kafkaInstance = null;

            try
            {
                kafkaInstance = KafkaDeployer.DeployNew(settings, log);

                if (started)
                {
                    kafkaInstance.Start();
                }

                return(kafkaInstance);
            }
            catch (Exception error)
            {
                log.Error(error, "Error in deploy. Will try to stop and cleanup.");
                kafkaInstance?.Dispose();
                KafkaDeployer.Cleanup(settings);
                throw;
            }
        }
예제 #2
0
 public void Dispose()
 {
     shellRunner.Stop();
     KafkaDeployer.Cleanup(BaseDirectory);
 }