class AMQP::Broker
A utility class that makes inspection of broker capabilities easier.
Constants
- RABBITMQ_PRODUCT
API
Attributes
properties[R]
Broker
information @return [Hash] @see Session#server_properties
Public Class Methods
new(properties)
click to toggle source
@return [Hash] properties Broker
information @see Session#server_properties
# File lib/amqp/broker.rb, line 20 def initialize(properties) @properties = properties end
Public Instance Methods
product()
click to toggle source
@return [String] Broker
product information
# File lib/amqp/broker.rb, line 32 def product @product ||= @properties["product"] end
rabbitmq?()
click to toggle source
@return [Boolean] true if broker is RabbitMQ
# File lib/amqp/broker.rb, line 27 def rabbitmq? self.product == RABBITMQ_PRODUCT end
supports_basic_nack?()
click to toggle source
@return [Boolean]
# File lib/amqp/broker.rb, line 53 def supports_basic_nack? @properties["capabilities"]["basic.nack"] end
supports_consumer_cancel_notifications?()
click to toggle source
@return [Boolean]
# File lib/amqp/broker.rb, line 58 def supports_consumer_cancel_notifications? @properties["capabilities"]["consumer_cancel_notify"] end
supports_exchange_to_exchange_bindings?()
click to toggle source
@return [Boolean]
# File lib/amqp/broker.rb, line 63 def supports_exchange_to_exchange_bindings? @properties["capabilities"]["exchange_exchange_bindings"] end
supports_publisher_confirmations?()
click to toggle source
@return [Boolean]
# File lib/amqp/broker.rb, line 48 def supports_publisher_confirmations? @properties["capabilities"]["publisher_confirms"] end
version()
click to toggle source
@return [String] Broker
version
# File lib/amqp/broker.rb, line 37 def version @version ||= @properties["version"] end