Messaging

  • Keep your message queues as short as possible. Many messages in a queue can put a heavy load on RAM usage. When this happens, RabbitMQ will start flushing messages to disk to free up RAM, and when that happens, queuing speeds will deteriorate. This paging process can take some time and will block the queue from processing messages. When there are a lot of messages to page out, it can take considerable time and will affect the performance of the broker negatively.
  •  Limit the number of messaging queues that you have. Queues are single-threaded in RabbitMQ, and one queue can handle up to about 50,000 messages. You will achieve better throughput on a multi-core system if you have multiple queues and consumers. You will achieve optimal throughput if you have as many queues as cores on the underlying node(s).
  • Split your messaging queues over multiple cores. Queue performance is limited to one CPU core. You will, therefore, get better performance if you split your queues into different cores, and into different nodes if you have a RabbitMQ cluster.
  • If you cannot afford to lose any messages, make sure that your messaging queue is declared as durable and your messages are sent with the persistent delivery mode.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset