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 AMQP::Session#server_properties

Public Instance Methods

product() click to toggle source

@return [String] Broker product information

# File lib/amqp/broker.rb, line 31
def product
  @product ||= @properties["product"]
end
rabbitmq?() click to toggle source

@return [Boolean] true if broker is RabbitMQ

# File lib/amqp/broker.rb, line 26
def rabbitmq?
  self.product == RABBITMQ_PRODUCT
end
supports_basic_nack?() click to toggle source

@return [Boolean]

# File lib/amqp/broker.rb, line 52
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 57
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 62
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 47
def supports_publisher_confirmations?
  @properties["capabilities"]["publisher_confirms"]
end
version() click to toggle source

@return [String] Broker version

# File lib/amqp/broker.rb, line 36
def version
  @version ||= @properties["version"]
end

Public Class Methods

new(properties) click to toggle source

@return [Hash] properties Broker information @see AMQP::Session#server_properties

# File lib/amqp/broker.rb, line 19
def initialize(properties)
  @properties = properties
end