Sha256: e5ce8a9568d836fb435379cefadaf8cb97be698e4a81e7ff3819d8182dfce73b

Contents?: true

Size: 1.39 KB

Versions: 21

Compression:

Stored size: 1.39 KB

Contents

module Fog
  module Rackspace
    class Queues
      class Real

        # This operation immediately deletes the specified message.
        # @note If you do not specify claim_id, but the message is claimed, the operation fails. You can only delete claimed messages by providing an appropriate claim_id.
        #
        # @param [String] queue_name Specifies the name of the queue.
        # @param [String] message_id Specifies the message ID.
        # @param [Hash] options
        # @option options [Integer] :claim_id - Identifies the claim.
        # @return [Excon::Response] response
        # @raise [Fog::Rackspace::Queues::NotFound] - HTTP 404
        # @raise [Fog::Rackspace::Queues::BadRequest] - HTTP 400
        # @raise [Fog::Rackspace::Queues::InternalServerError] - HTTP 500
        # @raise [Fog::Rackspace::Queues::ServiceError]
        # @see http://docs.rackspace.com/queues/api/v1.0/cq-devguide/content/DELETE_deleteMessage__version__queues__queue_name__messages__messageId__message-operations-dle001.html
        def delete_message(queue_name, message_id, options = {})
          query = {}
          query[:claim_id] = options[:claim_id] if options.has_key? :claim_id
          request(
            :expects => 204,
            :method => 'DELETE',
            :path => "queues/#{queue_name}/messages/#{message_id}",
            :query => query
          )
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
fog-maestrodev-1.19.0.20140212012611 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/rackspace/requests/queues/delete_message.rb
fog-1.19.0 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.18.0.20131205181604 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/rackspace/requests/queues/delete_message.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/rackspace/requests/queues/delete_message.rb