Beispiel #1
0
        public void ShutDown()
        {
            _consumerInstance.Shutdown();

            _consumerConnector
            .Verify(mock => mock.ReleaseAllPartitionOwnerships(),
                    Times.Once());
        }
Beispiel #2
0
        public void Shutdown()
        {
            if (!_running)
            {
                return;
            }

            lock (Lock)
            {
                if (!_running)
                {
                    return;
                }

                _instance?.Shutdown();
                _instance?.Dispose();
                _instance = null;
            }
        }