MySQL的消息队列插件-Q4M
2014-06-29 07:05:53 阿炯

本站赞助商链接,请多关照。 Q4M (queue for mysql) 是开源的实现队列功能的mysql存储引擎,目前支持mysql 5.1 以上的版本,有perl 的接口。它已经内置了对多连接并发的的支持,能保证一个消息只能被同一个connection获取到。采用c/c++开发并在GPL协议下授权。


Q4M (Queue for MySQL) is a message queue licensed under GPL that works as a pluggable storage engine of MySQL, designed to be robust, fast, flexible. It is already in production quality, and is used by several web services.

Q4M的包也需要是with-fast-mutexes-q4m模块,Q4M似乎不支持记录二进制log,所以在insert之前需要把log给关闭,这样就无法使用Mysql的Master和Slave机制了。

设计目标

Robust
Q4M logs all message transfers to disk. A power failure or OS crash would never loose a message.

Fast

Although Q4M syncs every operation to disk, it runs fast by using group commits, and checksums for data recovery. Even with HDD write cache disabled, it is able to transfer thousands of messages per second on an ordinal linux server.

Flexible
Since Q4M works as a storage engine of MySQL, ordinally SQL can be used for administration. It is also possible to JOIN Q4M queues against other MySQL tables. Or you may use triggers for sending data into queue.


最新版本:0.9


项目主页:http://q4m.github.io/