Class: RabbitmqClient::Exchange
- Inherits:
-
Object
- Object
- RabbitmqClient::Exchange
- Defined in:
- lib/rabbitmq_client/exchange.rb
Overview
ExchangeRegistry is a store for all managed exchanges and their details
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #create(channel) ⇒ Object
-
#initialize(name, type, options) ⇒ Exchange
constructor
A new instance of Exchange.
Constructor Details
#initialize(name, type, options) ⇒ Exchange
Returns a new instance of Exchange.
8 9 10 11 12 |
# File 'lib/rabbitmq_client/exchange.rb', line 8 def initialize(name, type, ) @name = name @type = type @options = end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/rabbitmq_client/exchange.rb', line 6 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/rabbitmq_client/exchange.rb', line 6 def @options end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/rabbitmq_client/exchange.rb', line 6 def type @type end |
Instance Method Details
#create(channel) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rabbitmq_client/exchange.rb', line 14 def create(channel) exhange_obj = Bunny::Exchange.new(channel, @type, @name, @options) ActiveSupport::Notifications.instrument( 'created_exhange.rabbitmq_client', name: @name, type: @type ) exhange_obj end |