Writing this book has been like discovering RabbitMQ itself—encountering a prob-
lem that needed solving, but not knowing what the solution looked like. Until May
2010, we didn’t even know each other. We both had been active in the RabbitMQ com-
munity for the past two years, but we’d never actually bumped into each other. Then
one day a conversation with Alexis Richardson (Rabbit’s CEO at the time) introduced
Alvaro and me to each other, and made what you hold in your hands possible. What
we had in common was a desire to write down in a single place all the knowledge we
had acquired about RabbitMQ the hard way. Back in 2010, that knowledge was (and
today still largely is) scattered across the internet in a smattering of blog articles and
terse technical tutorials. In other words, we both wanted to write the book we wished
had existed when we started with RabbitMQ two years earlier.
Neither of us came from a traditional messaging background, which made us fast
friends and has largely informed the tone of RabbitMQ in Action; we wanted this book
to be accessible for folks who’ve never heard of a queue or a binding before. In fact,
when each of us discovered RabbitMQ, we didn’t even know what “messaging” was or
that it was the solution to the problems we were having. My (Jason’s) situation was that
my company needed a way to take the spam reportings we received from our custom-
ers and process them out-of-band from our main stream of incoming messages. In
Alvaro’s case, his company had a social network whose member communication sys-
tem was creaking under the load of a 200 GB database. Like so many others who’ve
come to messaging, both us had first tried to solve our queue-centric issues using data-
base tables. Problems, like ensuring that only one application instance consumed any
particular queue item, plagued our attempts at a database-driven solution and sent us looking for a better way. After all, we knew we couldn’t be the first people in the his-
tory of software to have these issues.
The solution for both of us came in a surprisingly similar way: a friend at Plaxo told
me to check out this “RabbitMQ thing” as a way to solve my queue-centric problems,
and an Erlang colleague of Alvaro’s in China gave him the same advice. Halfway
around the world, both of us discovered RabbitMQ in the same way, and in response
to trying to solve almost exactly the same problem! In fact, since you’re reading this
book about RabbitMQ, it’s likely that similar challenges have led you to discover Rab-
bitMQ in the same way. That speaks to the fact of why RabbitMQ is so popular: it eas-
ily solves the basic problems of distributing data that each of us runs into again and
again when trying to scale the software that we build.
Our hope is that RabbitMQ in Action will help you design solutions to those chal-
lenges more quickly and easily with RabbitMQ, so you can spend more time writing
the software that will change the world and less time getting up to speed on the mes-
saging broker that will help you do it. Perhaps, along the way, RabbitMQ will intro-
duce you to an awesome coauthor who will become the lifelong friend you never
expected. 1 This book is a product of how much we love writing software, and our hope
is that it will help you do the same in ways you never thought possible.
A LVARO V IDELA
D ÜBENDORF , S WITZERLAND
J ASON J. W. W ILLIAMS
B OISE , I DAHO , U NITED S TATES
1