Class: RabbitMQ::Actors::RoutingConsumer Abstract
- Inherits:
-
Base::Consumer
- Object
- Base::Agent
- Base::Consumer
- RabbitMQ::Actors::RoutingConsumer
- Defined in:
- lib/rabbitmq/actors/patterns/routing/routing_consumer.rb
Overview
This class is abstract.
Subclass and override #perform to define your customized routing worker class.
A consumer of messages from RabbitMQ based on routing keys.
Instance Attribute Summary collapse
-
#binding_keys ⇒ Object
readonly
Returns the value of attribute binding_keys.
-
#exchange_name ⇒ Object
readonly
Returns the value of attribute exchange_name.
Attributes inherited from Base::Agent
Instance Method Summary collapse
-
#initialize(exchange_name:, binding_keys: '#', **opts) ⇒ RoutingConsumer
constructor
Rest of options required by your subclass.
Methods inherited from Base::Consumer
Constructor Details
#initialize(exchange_name:, binding_keys: '#', **opts) ⇒ RoutingConsumer
Rest of options required by your subclass.
63 64 65 |
# File 'lib/rabbitmq/actors/patterns/routing/routing_consumer.rb', line 63 def initialize(exchange_name:, binding_keys: '#', **opts) super(opts.merge(exchange_name: exchange_name, binding_keys: binding_keys)) end |
Instance Attribute Details
#binding_keys ⇒ Object (readonly)
Returns the value of attribute binding_keys.
55 56 57 |
# File 'lib/rabbitmq/actors/patterns/routing/routing_consumer.rb', line 55 def binding_keys @binding_keys end |
#exchange_name ⇒ Object (readonly)
Returns the value of attribute exchange_name.
51 52 53 |
# File 'lib/rabbitmq/actors/patterns/routing/routing_consumer.rb', line 51 def exchange_name @exchange_name end |