[rabbitmq-discuss] dropped messages
Matthias Radestock
matthias at lshift.net
Fri May 22 10:50:41 BST 2009
Mark,
smittycb10 wrote:
> It seems that my biggest problem was understanding the difference between a
> '#' and '*' in the routing key. Expect to see better results tomorrow.
> Would appreciate some performance tuning tips or pointers to documentation
> on this subject.
Here are a few tips of how to get the best performance out of AMQP:
- avoid topic exchanges if you can. Most use cases only need direct or
fanout exchanges, which are much more efficient. It is a common
misconception that direct exchanges only route messages to at most one
queue. That is not the case; they can route messages to multiple queues.
- on the consuming side, use basic.consume instead of basic.get, and
turn on 'no-ack' (thus eliminating the need to send acks), if your
application semantics permit that.
- avoid creating lots of exchanges. A common mistake, again mostly due
to misunderstanding about how direct exchanges work, is to create pairs
of exchanges and queues when a single exchange with lots of queues would
suffice. While RabbitMQ is perfectly happy with high exchange counts,
and the number of exchanges has little or no impact on routing
performance, exchange creation/deletion operations themselves are quite
expensive.
Beyond that, RabbitMQ and the underlying Erlang/OTP runtime can be tuned
to a degree. Plus the OS, in particular the network stack. In practice
though most users get good enough performance with the standard settings.
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list