Class: RabbitMQ::Actors::HeadersProducer
- Inherits:
-
Base::Producer
- Object
- Base::Agent
- Base::Producer
- RabbitMQ::Actors::HeadersProducer
- Defined in:
- lib/rabbitmq/actors/patterns/headers/headers_producer.rb
Overview
A producer of messages routed to certain queues bound based on message headers matching.
Instance Attribute Summary collapse
-
#headers_name ⇒ Object
readonly
Returns the value of attribute headers_name.
Attributes inherited from Base::Agent
Instance Method Summary collapse
-
#initialize(headers_name:, **opts) ⇒ HeadersProducer
constructor
A new instance of HeadersProducer.
-
#publish(message, message_id:, headers:, **opts) ⇒ Object
Send a message to the RabbitMQ server.
Methods inherited from Base::Producer
Constructor Details
#initialize(headers_name:, **opts) ⇒ HeadersProducer
Returns a new instance of HeadersProducer.
22 23 24 |
# File 'lib/rabbitmq/actors/patterns/headers/headers_producer.rb', line 22 def initialize(headers_name:, **opts) super(opts.merge(headers_name: headers_name)) end |
Instance Attribute Details
#headers_name ⇒ Object (readonly)
Returns the value of attribute headers_name.
17 18 19 |
# File 'lib/rabbitmq/actors/patterns/headers/headers_producer.rb', line 17 def headers_name @headers_name end |
Instance Method Details
#publish(message, message_id:, headers:, **opts) ⇒ Object
Send a message to the RabbitMQ server.
44 45 46 |
# File 'lib/rabbitmq/actors/patterns/headers/headers_producer.rb', line 44 def publish(, message_id:, headers:, **opts) super(, opts.merge(message_id: , headers: headers)) end |