Karait 消息队列系统

程序名称:Karait

授权协议: 未知

操作系统: 跨平台

开发语言: Python

Karait 介绍

Karait是一个消息队列系统,其消息存储采用了MongoDB的Capped
Collections结构,这一结构的特点就是集合的大小可设定,当数据大小超出设定大小时,新数据会抹掉旧数据。

Karait目前提供Python和Ruby的客户端操作包,也就是说你可以使用Python或Ruby来写消息,用Python或Ruby来读队列。

Ruby 版本示例代码

require 'karait'

queue = Karait::Queue.new(
    :host => 'localhost', # MongoDB host. Defaults to localhost.
    :port => 27017, # MongoDB port. Defaults to 27017.
    :database => 'karait', # Database that will store the karait queue. Defaults to karait.
    :queue => 'messages', # The capped collection that karait writes to. Defaults to messages.
    :average_message_size => 8192, # How big do you expect the messages will be in bytes? Defaults to 8192.
    :queue_size => 4096 # How many messages should be allowed in the queue. Defaults to 4096.
)

queue.write({
    :name => 'Benjamin',
    :action => 'Rock'
})

# or

message = Karait::Message.new
message.name = 'Benjamin'
message.action = 'Rock!'

queue.write(message, :routing_key => 'my_routing_key', :expire => 3.)

Karait 官网

https://github.com/bcoe/karait

相关编程语言

SchemaCrawler提供一组用于增强标准JDBC Metadata的...
ER Master 是一个用于设计ER模型图的Eclipse插件。提...
Eclipse下用于画数据库ER图的插件,主要特性如下: ...
PowerDesigner 是Sybase的企业建模和设计解决方案,...
Mogwai ERDesigner NG是一个实体关系建模工具类似于...
Power*Architect 是一个数据建模工具,主要用在数据...