Class: Twingly::AMQP::TopicExchangePublisher
- Inherits:
-
Object
- Object
- Twingly::AMQP::TopicExchangePublisher
- Includes:
- Publisher
- Defined in:
- lib/twingly/amqp/topic_exchange_publisher.rb
Instance Method Summary collapse
-
#initialize(exchange_name:, routing_key: nil, connection: Connection.instance, opts: {}) ⇒ TopicExchangePublisher
constructor
A new instance of TopicExchangePublisher.
Methods included from Publisher
#configure_publish_options, #publish, #publish_with_confirm
Constructor Details
#initialize(exchange_name:, routing_key: nil, connection: Connection.instance, opts: {}) ⇒ TopicExchangePublisher
Returns a new instance of TopicExchangePublisher.
6 7 8 9 10 |
# File 'lib/twingly/amqp/topic_exchange_publisher.rb', line 6 def initialize(exchange_name:, routing_key: nil, connection: Connection.instance, opts: {}) .routing_key = routing_key @exchange = connection.create_channel.topic(exchange_name, opts) end |