Method: Propono::Client#listen

Defined in:
lib/propono/components/client.rb

#listen(topic_name, options = {}, &message_processor) ⇒ Object

Listens on a queue and yields for each message

Calling this will enter a queue-listening loop that yields the message_processor for each messages.

This method will automatically create a subscription if one does not exist, so there is no need to call subscribe in addition.

Parameters:

  • topic (String)

    The topic to subscribe to.

  • &message_processor

    The block to yield for each message.



77
78
79
# File 'lib/propono/components/client.rb', line 77

def listen(topic_name, options = {}, &message_processor)
  QueueListener.listen(aws_client, config, topic_name, options, &message_processor)
end