Design pattern in Ruby for using AMPQ