Exemple #1
0
        public void Dispose()
        {
            if (_running)
            {
                Shutdown();
            }

            _consumer?.Dispose();
            _consumer = null;

            _manager?.Dispose();
            _manager = null;
        }
Exemple #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (!this.disposed)
            {
                if (disposing)
                {
                    lock (lockForDictionaryChange)
                    {
                        Logger.Info("Got lock Will dispose KafkaSimpleManager ...");
                        kafkaSimpleManage.Dispose();
                        kafkaSimpleManage = null;
                        config            = null;
                        Logger.Info("Finish dispose KafkaSimpleManager ...will release lock.");
                    }
                }

                disposed = true;
            }
        }