Class: RabbitMQ::Actors::TopicConsumer Abstract
- Inherits:
-
Base::Consumer
- Object
- Base::Agent
- Base::Consumer
- RabbitMQ::Actors::TopicConsumer
- Defined in:
- lib/rabbitmq/actors/patterns/topics/topic_consumer.rb
Overview
This class is abstract.
Subclass and override #perform to define your customized topic worker class.
A consumer of messages from RabbitMQ based on exchange and routing key matching patterns.
Instance Attribute Summary collapse
-
#binding_keys ⇒ Object
readonly
Returns the value of attribute binding_keys.
-
#topic_name ⇒ Object
readonly
Returns the value of attribute topic_name.
Attributes inherited from Base::Agent
Instance Method Summary collapse
-
#initialize(topic_name:, binding_keys: '#', **opts) ⇒ TopicConsumer
constructor
Rest of options required by your subclass.
Methods inherited from Base::Consumer
Constructor Details
#initialize(topic_name:, binding_keys: '#', **opts) ⇒ TopicConsumer
Rest of options required by your subclass.
69 70 71 |
# File 'lib/rabbitmq/actors/patterns/topics/topic_consumer.rb', line 69 def initialize(topic_name:, binding_keys: '#', **opts) super(opts.merge(topic_name: topic_name, binding_keys: binding_keys)) end |
Instance Attribute Details
#binding_keys ⇒ Object (readonly)
Returns the value of attribute binding_keys.
61 62 63 |
# File 'lib/rabbitmq/actors/patterns/topics/topic_consumer.rb', line 61 def binding_keys @binding_keys end |
#topic_name ⇒ Object (readonly)
Returns the value of attribute topic_name.
57 58 59 |
# File 'lib/rabbitmq/actors/patterns/topics/topic_consumer.rb', line 57 def topic_name @topic_name end |