def publish(exchange, type, key, payload, options = {})
      ex = producer_exchanges[exchange] ||=
        declare_exchange(producer_channel, exchange, type, config.exchange_options)

      log.debug("Publishing to exchange #{exchange.inspect} via #{key.inspect}")

      ex.publish(payload, options.merge({
        :exchange    => exchange,
        :routing_key => key
      }))

      self
    end
def publish(exchange, type, key, payload, options = {})
      ex = producer_exchanges[exchange] ||=
        declare_exchange(producer_channel, exchange, type, config.exchange_options)

      log.debug("Publishing to exchange 

      ex.publish(payload, options.merge({
        :exchange    => exchange,
        :routing_key => key
      }))

      self
    end
def publish ( exchange , type , key , payload , options = { } ) ex = producer_exchanges [ exchange ] ||= declare_exchange ( producer_channel , exchange , type , config . exchange_options ) log . debug ( "Publishing to exchange #{exchange.inspect} via #{key.inspect}" ) ex . publish ( payload , options . merge ( { :exchange => exchange , :routing_key => key } ) ) self end
Publish a payload to the specified exchange/key pair.

 @param exchange [String]
 @param type [String]
 @param key [String]
 @param payload [Object]
 @return [Messaging::Producer]
 @api public
Publish a payload to the specified exchange / key pair .