Class: KarlMalone::ConsumerOptions
- Inherits:
-
Object
- Object
- KarlMalone::ConsumerOptions
- Defined in:
- lib/karl_malone/consumer_options.rb
Constant Summary collapse
- EXCHANGE_TYPES =
[:direct, :fanout, :topic, :headers]
Instance Attribute Summary collapse
-
#exchange_options ⇒ Object
readonly
Returns the value of attribute exchange_options.
-
#queue_options ⇒ Object
readonly
Returns the value of attribute queue_options.
Instance Method Summary collapse
- #exchange_configurations ⇒ Object
- #exchange_name ⇒ Object
- #exchange_type ⇒ Object
-
#initialize(exchange_options, queue_options) ⇒ ConsumerOptions
constructor
A new instance of ConsumerOptions.
- #queue_configurations ⇒ Object
- #queue_name ⇒ Object
- #routing_key ⇒ Object
Constructor Details
#initialize(exchange_options, queue_options) ⇒ ConsumerOptions
Returns a new instance of ConsumerOptions.
6 7 8 9 10 11 |
# File 'lib/karl_malone/consumer_options.rb', line 6 def initialize(, ) @exchange_options = @queue_options = end |
Instance Attribute Details
#exchange_options ⇒ Object (readonly)
Returns the value of attribute exchange_options.
4 5 6 |
# File 'lib/karl_malone/consumer_options.rb', line 4 def @exchange_options end |
#queue_options ⇒ Object (readonly)
Returns the value of attribute queue_options.
4 5 6 |
# File 'lib/karl_malone/consumer_options.rb', line 4 def @queue_options end |
Instance Method Details
#exchange_configurations ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/karl_malone/consumer_options.rb', line 29 def exchange_configurations { :passive => false, :durable => false, :auto_delete => false, :internal => false, :default_routing_key => nil, :no_declare => true }.merge() end |
#exchange_name ⇒ Object
17 18 19 |
# File 'lib/karl_malone/consumer_options.rb', line 17 def exchange_name [:name] end |
#exchange_type ⇒ Object
13 14 15 |
# File 'lib/karl_malone/consumer_options.rb', line 13 def exchange_type [:type] end |
#queue_configurations ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'lib/karl_malone/consumer_options.rb', line 40 def queue_configurations { :passive => false, :durable => false, :exclusive => false, :auto_delete => false, :no_wait => false }.merge() end |
#queue_name ⇒ Object
21 22 23 |
# File 'lib/karl_malone/consumer_options.rb', line 21 def queue_name [:name] end |
#routing_key ⇒ Object
25 26 27 |
# File 'lib/karl_malone/consumer_options.rb', line 25 def routing_key [:routing_key] end |