This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# written by Pradeep Gatram, www.masplantiz.com | |
# no restrictions whatsoever on usage. | |
require 'rubygems' | |
require 'mq' | |
EM.run do | |
def replicate source, destination, topic | |
source_q = MQ::Queue.new(source, "replicator for #{topic}") | |
source_q.bind(MQ::Exchange.new(source, :topic, topic)) |