以下是CentOS上RabbitMQ集群的优化策略:
rabbitmq.conf,增加max_connections和max_channels_per_connection,设置合理的vm_memory_high_watermark和disk_free_limit。Publisher Confirms确保消息可靠投递,根据场景选择消息持久化策略。ha - mode=all或按需选择exactly,并配置ha - sync - mode。prefetch count,平衡消费效率和资源占用。connection - timeout和requested - heartbeat。