RabbitMQ小消息确认机制优化
作者:
基金项目:

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


Optimization of Tiny Message Acknowledgement in RabbitMQ
Author:
  • 摘要
  • | |
  • 访问统计
  • |
  • 参考文献 [12]
  • |
  • 相似文献 [20]
  • | | |
  • 文章评论
    摘要:

    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.

    参考文献
    [1] Rostanski M, Grochla K, Seman A. Evaluation of highly available and fault-tolerant middleware clustered architectures using RabbitMQ. Federated Conference on Computer Science and Information Systems. Warsaw, Poland. 2014. 879-884.
    [2] Videla A, Williams JJW. RabbitMQ实战: 高效部署分布式消息队列. 汪佳南, 译. 北京: 电子工业出版社, 2015.
    [3] Ionescu VM. The analysis of the performance of RabbitMQ and ActiveMQ. 14th RoEduNet International Conference - Networking in Education and Research (RoEduNet NER). Craiova, Romania. 2015. 132-137.
    [4] Vandikas K, Tsiatsis V. Performance evaluation of an IoT platform. 8th International Conference on Next Generation Mobile Apps, Services and Technologies. Oxford, UK. 2014. 141-146.
    [5] Dawar S, Fallon E, Bennet T, et al. An extensible architecture for mobile network management event distribution and rule processing-a performance evaluation. 1st International Conference on Artificial Intelligence, Modelling and Simulation. Kota Kinabalu, Malaysia. 2013. 451-456.
    [6] Yang WJ, Liu XG, Zhang L, et al. Big data real-time processing based on storm. 12th IEEE International Conference on Trust, Security and Privacy in Computing and Communications. Melbourne, VIC, Australia. 2013. 1784-1787.
    [7] Cesarini F, Thompson S. Erlang编程指南. 慕尼黑Isar工作组, 杨剑, 译. 北京: 机械工业出版社, 2011.
    [8] 袁佳. 基于主机日志的入侵检测系统的设计与实现[硕士学位论文]. 北京: 北京邮电大学, 2014.
    [9] 李帅. RabbitMQ进程结构分析与性能调优. https://www. qcloud.com/community/article/164816001481011847. [2016-10-10].
    [10] Persistence Configuration. http://www.rabbitmq.com/persistence-conf.html. [2017-06-01]
    [11] RabbitMQ performance measurements, part 1. http://www.rabbitmq.com/blog/2012/04/17/rabbitmq-performance-measurements-part-1/. [2012-04-17]
    [12] RabbitMQ performance measurements, part 2. http://www.rabbitmq.com/blog/2012/04/25/rabbitmq-performance-measurements-part-2/. [2012-04-25]
    引证文献
    网友评论
    网友评论
    分享到微博
    发 布
引用本文

徐震,焦文彬. RabbitMQ小消息确认机制优化.计算机系统应用,2018,27(3):252-257

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

京公网安备 11040202500063号