title: Get an object from a bucket in riak without knowing its key
body: <p>I am using a riak bucket to store a list of messages, using a UUID as the key and a json message as value. This is working fine.</p>
  
  <p>What I need is an efficient way to <strong>get a single message from the bucket without knowing its key</strong>, at least in one of these two scenarios:</p>
  
  <ol>
  <li>Get the last inserted object (this is my prefered approach).</li>
  <li>Get a random object from the bucket (if the first alternative is not possible).</li>
  </ol>
  
  <p>Is there any efficient way to achieve that?</p>
  
  <p>I think one alternative could be to retrieve the keys in the bucket and then get the first one. But this means making two calls to riak, one to obtain all the keys (just to discard all but one) and a second one to obtain the object. It does not seem very efficient.</p>