### Home Classes Methods

### In Files

- lib/amqp/broker.rb

### Parent

Object

### Methods

- ::new
- #product
- #rabbitmq?
- #supports_basic_nack?
- #supports_consumer_cancel_notifications?
- #supports_exchange_to_exchange_bindings?
- #supports_publisher_confirmations?
- #version

### Class/Module Index

Quicksearch

- AMQP
- AMQP::Broker
- AMQP::Channel
- AMQP::ChannelClosedError
- AMQP::Client
- AMQP::Consumer
- AMQP::Error
- AMQP::Exchange
- AMQP::Header
- AMQP::IncompatibleOptionsError
- AMQP::Integration
- AMQP::Integration::Rails
- AMQP::PossibleAuthenticationFailureError
- AMQP::Queue
- AMQP::Session
- AMQP::TCPConnectionFailed
- AMQP::Utilities
- AMQP::Utilities::EventLoopHelper
- AMQP::Utilities::ServerType

No matching classes.

# 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 19
    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 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.