首页> 中文期刊> 《计算机系统应用》 >RabbitMQ小消息确认机制优化

RabbitMQ小消息确认机制优化

         

摘要

Message acknowledgement mechanism in RabbitMQ includes confirm and ack. If the message doesnot need to be persisted, when the producer receives confirmation, the message may still be lost and the producer canot know that, so consumers may not receive the message. If the message needs to be persisted, when the producer receives confirmation, the message may be on the way to consumers. This study optimizes the message acknowledgement mechanism in RabbitMQ. After optimization, confirmation is sent to the producer after receiving the ack. The producer resends the message if the message is lost. Information that needs to be recorded is reduced during the message acknowledgement process. The producer receives confirmation after consumers receive the message successfully. The reliability of transient tiny messages delivery is improved. The experimental results reveal that the method can improve the sending rate of persistent tiny messages obviously when the number of clients is small.%RabbitMQ的消息确认机制包括生产者确认(confirm)与消费者确认(ack). 若消息不需要进行持久化, 生产者收到确认, 消息仍有可能丢失, 且生产者不知道消息己丢失, 消费者可能无法收到该消息. 若消息需要进行持久化, 生产者收到确认时, 消费者可能还没有收到消息. 本文对RabbitMQ的消息确认机制进行优化, 在收到消费者确认后向生产者发送确认消息, 消息丢失时由生产者重发消息, 减少消息确认过程记录的信息. 生产者收到确认即可保证消息被消费者成功接收, 提高了非持久化小消息投递的可靠性. 实验结果表明, 在客户端数量较少时, 该方法能够明显提高持久化小消息的发送速率.

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号