Fixed minor syntax and logic errors in the rabbitmq output.

I had to fix some syntax errors as well as one variable in the wrong place to get the rabbitmq output to work.