def send_message(queue_url, message_body, delay_seconds=nil)
      options = {"MessageBody" => message_body}
      options["DelaySeconds"] = delay_seconds if delay_seconds

      tries = 0
      md5 = Digest::MD5.hexdigest(message_body)

      begin
        tries += 1
        response = action("SendMessage", queue_url, options)
        
        returned_md5 = response.doc.xpath("//MD5OfMessageBody").text
        raise MessageHasWrongMd5Error.new(message_body, md5, returned_md5) unless md5 == returned_md5
      rescue MessageHasWrongMd5Error
        if tries < 2
          retry
        else
          raise
        end
      end
    end
def send_message(queue_url, message_body, delay_seconds=nil)
      options = {"MessageBody" => message_body}
      options["DelaySeconds"] = delay_seconds if delay_seconds

      tries = 0
      md5 = Digest::MD5.hexdigest(message_body)

      begin
        tries += 1
        response = action("SendMessage", queue_url, options)
        
        returned_md5 = response.doc.xpath("//MD5OfMessageBody").text
        raise MessageHasWrongMd5Error.new(message_body, md5, returned_md5) unless md5 == returned_md5
      rescue MessageHasWrongMd5Error
        if tries < 2
          retry
        else
          raise
        end
      end
    end
Put a message on a queue. Takes the queue url and the message body, which
 should be a string. An optional delay seconds argument can be added if
 the message should not become visible immediately.

 @param [String] queue_url
 @param [String] message_body
 @param [Fixnum] delay_seconds
 @return nil
 @raise [MessageHasWrongMd5Error]
 @raise [AwsActionError]

 @example

   client.send_message(queue.path, "test message")