AMQP is a ridiculously over-engineered monstrosity and a saturn-sized ball on a chain for any project.
Redis is faster than BeanStalkd, a tiny message queue server written in C that uses libevent and a simple memcached-like protocol. Redis kicks ass, specially the beta versions.
Also, Redis is a centralized server and a single point of failure - 0MQ doesn't force you into that topology.
That said, I'd still like to see benchmarks showing Redis beating Beanstalkd. Of the two, I've only used Beanstalkd, but it's a great example of keeping things simple while still providing advanced functionality.
_
People have modeled message queues with far more primitive solutions:
http://www.freeopenbook.com/php-hacks/phphks-CHP-5-SECT-18.h...
A Redis based solution might not be as elaborate as RabbitMQ, but it will be very clean and straightforward, not to mention blindingly fast, and will get the job done.
That said, I'm not really in the mood to reinvent that particular wheel myself here, but would probably give someone else's shot a try.
Sure, the Redis C codebase is fairly approachable. Perhaps you were suggesting adding new protocol commands?
Does redis has any job queue facilities for making a reliable, low-latency, safe job queue?
http://www.rockstarprogrammer.org/post/2008/oct/04/what-matt...
It's not interesting to discuss what you can use to hack a queue together. Lots and lots of really badly thought out queue services exist today built on top of memcached or a relational database or other things that appear to work in normal cases, but can go horribly wrong and start losing data when bad things happen.
I've been using it for a while, and I find it to be quite simple. I send messages based on a routing key. They go to the right place, and reasonably fast (though not as fast as zeromq). What's overengineered about it?
Even one of the authors in this article admits dumb decisions like making it a binary protocol and generally making it extra-ordinarily difficult to create a working protocol endpoint. What's up with this whole XML descriptor thing...
In summary AMQP has been the most painful protocol I had the misfortune to work with since leaving java-land. (Admittedly partly because the python drivers are especially messy)
Simple protocol, main implementation 6000 lines of non-awful C, libevent... What's not to like?
"Likewise, neither 0MQ nor AMQP works on Internet scales, where RESTful principles become more important than immediate performance."
I don't follow this logic. Can someone help me understand why 0MQ would not be appropriate at "Internet scales" (and I presume "should" be relegated to LANs)?
I ask because (1) it looks great for a general transport at any "scale" and (2) the article itself discusses a scenario in which 0MQ could be used over a WAN (branch offices, the forwarder, etc.).
What am I missing?
"Yup. Seen that one [UDT]. However, AFAIU, it focuses on moving large messages over high-latency high-volume links. 0MQ is focused on short messages on low-latency high-volume links."
http://lists.zeromq.org/pipermail/zeromq-dev/2009-August/001...
Looking at the API, how could my application detect that messages aren't being delivered to a particular peer?
As for detecting that messages aren't being delivered to a particular peer, at the moment that is not possible since zmq_send() is asynchronous from the point of view of the caller, i.e. the actual sending gets offloaded to a background thread.
Unfortunately there's no straightforward way to map asynchronous error handling onto the socket API. I guess we could experiment with hitting the calling thread with a SIGPIPE or similar but signal handling on a lot of systems is suboptimal (to put it politely) and we also need to support Win32. So this whole area requires more thought...
(edit: yoru -> your)
Also, if all three are evenly distributed, then that makes the letter prefix preferable to the digit prefix 2:1.
In any event, I think "0mq" looks ugly and people might mistake it for "OMG".
Good news though. A few months later I was programming in Forth, learning from a self-xeroxed copy of Starting Forth, and it had the zero-slash everywhere. I am not sure when did I realize that Ø == 0. (It looks like the empty set, aka "phi" Φ)
[Edit: http://en.wikipedia.org/wiki/%C3%98_%28disambiguation%29 ]