Skip to content

Instantly share code, notes, and snippets.

View slemiere's full-sized avatar

Sylvain Lemiere slemiere

View GitHub Profile
# 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))