7

Super simple question, I couldn't find a concrete answer out there.

Is RabbitMQ suitable for RPC-like operations when processing HTTP requests?

I'm interested in firing off a message when a user HTTP request is received, waiting for the response from a backend server, and then sending the response to the client.

Is that a common use scenario? Are people doing it with success? Any pitfalls? Any examples or common design patterns?

Andrew
  • 203
  • 3
  • 6

2 Answers2

2

Yes we use rabbitmq in a similar fashion in production.

See Request Reply Pattern

LenW
  • 3,054
  • 1
  • 24
  • 25
  • Well I guess you can't argue with use in production! Thanks! – Andrew Mar 21 '12 at 14:07
  • We looked all over for a simple way to expose amqp over http, its not a straight forward mapping. If was starting today I would do it with node.js (node-amqp) and build the http protocol the way i wanted to support my particular use cases. The biggest thing to think about is authentication via http to rabbit .. – LenW Mar 21 '12 at 19:15
1

This has worked for me, I do suggest you look at the Web messaging extentions/tools though:

http://www.rabbitmq.com/devtools.html#web-messaging

dgorissen
  • 6,207
  • 3
  • 43
  • 52