class BitBroker::Broker

This method communicate with AMQP for transmitting and receiving data

Constants

ENCRYPT_ALGORITHM
RKEY_DATA
RKEY_METADATA

Public Class Methods

new(config) click to toggle source
# File lib/bitbroker/broker.rb, line 12
def initialize(config)
  @connection = Bunny.new(:host     => config[:mqconfig]['host'],
                          :vhost    => config[:mqconfig]['vhost'],
                          :user     => config[:mqconfig]['user'],
                          :password => config[:mqconfig]['passwd'])
  @connection.start
  @channel = @connection.create_channel
  @exchange = @channel.direct(config[:label])
  @passwd = config[:passwd].to_s + config[:label]
end

Public Instance Methods

finish() click to toggle source
# File lib/bitbroker/broker.rb, line 23
def finish
  @channel.close
  @connection.close
end