RabbitMQ小消息确认机制优化
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

中国科学院“十三五”信息化专项(Y72922802401)


Optimization of Tiny Message Acknowledgement in RabbitMQ
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 增强出版
  • |
  • 文章评论
    摘要:

    RabbitMQ的消息确认机制包括生产者确认(confirm)与消费者确认(ack).若消息不需要进行持久化,生产者收到确认,消息仍有可能丢失,且生产者不知道消息已丢失,消费者可能无法收到该消息.若消息需要进行持久化,生产者收到确认时,消费者可能还没有收到消息.本文对RabbitMQ的消息确认机制进行优化,在收到消费者确认后向生产者发送确认消息,消息丢失时由生产者重发消息,减少消息确认过程记录的信息.生产者收到确认即可保证消息被消费者成功接收,提高了非持久化小消息投递的可靠性.实验结果表明,在客户端数量较少时,该方法能够明显提高持久化小消息的发送速率.

    Abstract:

    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小消息确认机制优化.计算机系统应用,2018,27(3):252-257

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2017-06-27
  • 最后修改日期:2017-07-10
  • 录用日期:
  • 在线发布日期: 2018-02-11
  • 出版日期:
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京海淀区中关村南四街4号 中科院软件园区 7号楼305房间,邮政编码:100190
电话:010-62661041 传真: Email:csa (a) iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号