Hey Folks, after PDC 09′ I’m back on track doing some work on the Windows Azure Storage SDK for Ruby. On my Channel9 interview, I told you that Ray Ozzie announced a new version of Windows Azure Storage API (a.k.a 2009-09-19) which enables developers to perform new tasks on the storage components

These are the enhancements for the 0.5.6 version of the SDK, this release only covers the Windows Azure Queues Service 2009-09-19 version, Blobs support will be released end of this week or early next week.

What’s new on the 0.5.6 version?

  • Added new shared key authentication support for 2009-09-19 Version of the Storage API
  • Queues API has been migrated to the 2009-09-19 Version of the Storage API
  • Added a new parameter for Listing Queues with Metadata
  • Added support for DequeueCount on messages being retrieved from the Queue
  • Known Issue: Creating a queue multiple times with same metadata throws 409.

Using the latest version of the Windows Azure Storage SDK for Poison Message detection

  WAZ::Storage::Base.establish_connection!(:account_name => 'name', :access_key => 'key')

  # Let's start by selecting a queue
  queue = WAZ::Queues::Queue.find('my-queue')

  # While the queue has messages, let's check the content
  while (queue.size > 0) do
    # Now let's dequeue a message as we usually do we the API
    message = queue.lock

    # Before processing the message we can now do a sanity check for the message
    # if the message has been dequeued more than 5 times we will destroy it since
    # it can be a poison message.
    if (message.dequeue_count > 5)
        message.destroy!
    else
        # We process the message as we usually do
    end
  end

The key feature on this version of the API is the dequeue_count property for Queues which serves the primary goal, as shown sample above, of Poison Message detection.

Stay tuned for further updates on the SDK…

thanks,
~johnny