Let me explain what we're trying to do, which may be crazy. But if it's not crazy, perhaps someone can tell us how to use AMQP to do it.
We have a Rails app that talks to a growing number of backend Clojure services.
It could talk to them via HTTP, but many of the messages don't need to be synchronous. They're "fire and forget". Hence AMQP.
For the synchronous messages, we observed two things:
-
Serializing and deserializing HTTP is surprisingly annoying, especially given Rails conventions.
-
Most of the time when we send a message that updates a resource, we don't need a synchronous acknowledgement right away. We only need to know that the update has happened at some point before we next read the resource.