lib/sqs/right_sqs_gen2.rb
# Retrieves several messages from queue. 
# Returns an array of Message instances. 
#
#  queue.receive_messages(2,10) #=> array of messages
#
Retrieves several messages from queue.
Returns an array of Message instances.


Retrieves several messages from queue . Returns an array of Message instances .
def receive_messages(number_of_messages=1, visibility=nil, attributes=nil)
        list = @sqs.interface.receive_message(@url, number_of_messages, visibility, attributes)
        list.map! do |entry|
          msg = Message.new(self, entry['MessageId'], entry['ReceiptHandle'], entry['Body'], visibility, entry['Attributes'])
          msg.received_at = Time.now 
          msg.receive_checksum = entry['MD5OfBody']
          msg
        end
      end
def receive_messages ( number_of_messages = 1 , visibility = nil , attributes = nil ) list = @sqs . interface . receive_message ( @url , number_of_messages , visibility , attributes ) list . map! do | entry | msg = Message . new ( self , entry [ 'MessageId' ] , entry [ 'ReceiptHandle' ] , entry [ 'Body' ] , visibility , entry [ 'Attributes' ] ) msg . received_at = Time . now msg . receive_checksum = entry [ 'MD5OfBody' ] msg end end
Retrieves several messages from queue.
Retrieves several messages from queue .
number_of_messages
<not_specific>
visibility
<not_specific>
attributes
<not_specific>