//====================================
        // Stoppable
        //====================================

        public override void Stop()
        {
            _cancellable.Cancel();
            _subscriber.Close();
            _buffer.Dispose();
            base.Stop();
        }
        private void StopProcessing()
        {
            _stopped = true;

            if (_publisher != null)
            {
                try
                {
                    _publisher.Close();
                }
                catch
                {
                    // ignore
                }
                finally
                {
                    _publisher = null;
                }
            }

            if (_cancellableMessageProcessing != null)
            {
                try
                {
                    _cancellableMessageProcessing.Cancel();
                }
                catch
                {
                    // ignore
                }
                finally
                {
                    _cancellableMessageProcessing = null;
                }
            }

            if (_cancellablePublishing != null)
            {
                try
                {
                    _cancellablePublishing.Cancel();
                }
                catch
                {
                    // ignore
                }
                finally
                {
                    _cancellablePublishing = null;
                }
            }
        }
        //====================================
        // Stoppable
        //====================================

        public override void Stop()
        {
            _cancellable.Cancel();
            base.Stop();
        }