Sha256: 88a868698bf5b171f6d8c49bedda7befdb4f1468308188ecbd495bbab39b0514
Contents?: true
Size: 525 Bytes
Versions: 6
Compression:
Stored size: 525 Bytes
Contents
module Firehose class Publisher def publish(path, message) channel = AMQP::Channel.new(Firehose.amqp.connection) exchange = AMQP::Exchange.new(channel, :fanout, path, :auto_delete => true) # TODO How do I clean up this exchange at this point? Do I close it somehow or the channel? # The exchange just hangs out indefinitely now. Firehose.logger.debug "AMQP publishing `#{message}` to `#{path}`" exchange.publish(message) exchange.delete(:if_unused => true) end end end
Version data entries
6 entries across 6 versions & 1 rubygems