public void Enqueue(object message)
        {
            var buffer = _itemSerializer.Serialize(message);

            lock (_syncLock)
            {
                _queue.Enqueue(buffer);
                _queue.FlushWriter();
            }

            _dataEnqueuedEvent.Set();
        }
        public void Enqueue(object message)
        {
            var str = JSON.ToJSON(message);

            _queueCount++;

            lock (_syncLock)
            {
                _queue.Enqueue(Encoding.UTF8.GetBytes(str));
                _queue.FlushWriter();
            }

            _dataEnqueuedEvent.Set();
        }