'Get the first available message from the queue.
Before it does so it acquires a lock on the Key/Value store so
only one node reads at the same time. This is for read consistency'

def _get(self, queue, timeout=None):

    with self._queue_lock(queue, raising=Empty):
        key = u'{0}/msg/'.format(self._key_prefix(queue))
        logger.debug(u'Fetching    key    %s    with    index    %s', key, self.index)
        (self.index, data) = self.client.kv.get(key=key, recurse=True, index=self.index, wait=self.timeout)
        try:
            if (data is None):
                raise Empty()
            logger.debug(u'Removing    key    %s    with    modifyindex    %s', data[0][u'Key'], data[0][u'ModifyIndex'])
            self.client.kv.delete(key=data[0][u'Key'], cas=data[0][u'ModifyIndex'])
            return loads(data[0][u'Value'])
        except TypeError:
            pass
    raise Empty()
