Skip to content

Instantly share code, notes, and snippets.

@michaelklishin
Created July 8, 2011 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelklishin/1071983 to your computer and use it in GitHub Desktop.
Save michaelklishin/1071983 to your computer and use it in GitHub Desktop.
step1_queue = input_channel.queue("workflow.step1")
step3_queue = output_channel.queue("workflow.step3")
rebroadcaster = AMQP::Rebroadcaster.new(step1_queue, step3_queue)
rebroadcaster.transform_with do |metadata, payload|
# do some work
# ...
# return new payload & options Exchange#publish will accept as a pair:
[options, payload]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment