Pivotal Knowledge Base

Follow

How to maximize throughput for Java RabbitMQ client (Internal Article)

Environment

Product Version
Pivotal RabbitMQ All
RabbitMQ Java Client  All

Purpose

The scope of this article is to provide guidance for tuning attributes to maximize throughput for Java RabbitMQ clients. 

Resolution

Here are some ways that you can get more throughput in your Java client.

  • Consider using Channel.basicConsume instead of Channel.basicGet. If basicConsume is used, messages are delivered automatically as they arrive as compared to basicGet where you explicitly request for messages to arrive.
  • Consider using autoAck = true rather than manually doing basicAck or basicNack.
  • Increasing prefetchCount and prefetchSize will also increase consumer utilization.
  • Use smaller messages rather than large messages as this affects latency. 
  • Increase concurrency of your consumers, so that consumers can scale as messages increases.

 

Comments

Powered by Zendesk