@Override
    public List<Message> peekMessages(int itemsToPeek) throws MessageQueueException {
        List<Message> messages = Lists.newArrayList();

        for (MessageQueueShard shard : shardReaderPolicy.listShards()) {
            messages.addAll(peekMessages(shard.getName(), itemsToPeek - messages.size()));

            if (messages.size() == itemsToPeek)
                return messages;
            }

        return messages;
    }
@ Override public List < Message > peekMessages ( int itemsToPeek ) throws MessageQueueException { List < Message > messages = Lists . newArrayList ( ) ; for ( MessageQueueShard shard : shardReaderPolicy . listShards ( ) ) { messages . addAll ( peekMessages ( shard . getName ( ) , itemsToPeek - messages . size ( ) ) ) ; if ( messages . size ( ) == itemsToPeek ) return messages ; } return messages ; }
Iterate through shards attempting to extract itemsToPeek items.  Will return
once itemToPeek items have been read or all shards have been checked.

Note that this call does not take into account the message trigger time and
will likely return messages that aren't due to be executed yet.
@return List of items