您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

ElasticMQ 0.2 – 支持延迟队列和消息

2024/2/28 20:30:27发布14次查看
elasticmq 是一个使用 scala 编写的简单消息队列系统。当前使用嵌入式数据库 h2 来存储消息。elasticmq 实现了 sqs rest 接口的子集,提供一个 sqs 的可选方案。 elasticmq 0.2 最值得关注的就是支持延迟队列和消息,另外实现了 amazon sqs 接口。 // first
elasticmq 是一个使用 scala 编写的简单消息队列系统。当前使用嵌入式数据库 h2 来存储消息。elasticmq 实现了 sqs rest 接口的子集,提供一个 sqs 的可选方案。
elasticmq 0.2 最值得关注的就是支持延迟队列和消息,另外实现了 amazon sqs 接口。
// first we need to create a nodeval node = nodebuilder.withinmemorystorage().build()// then we can expose the native client using the sqs rest interfaceval server = sqsrestserverfactory.start(node.nativeclient, 8888, http://localhost:8888)// now we need to create the sqs clientclient = new amazonsqsclient(new basicawscredentials(x, x))client.setendpoint(http://localhost:8888)// using the client is quite straightforwardval queueurl = client.createqueue(new createqueuerequest(queue1)) .getqueueurlclient.sendmessage(new sendmessagerequest(queueurl, message1))client.shutdown()// finally we need to stop the server and the nodeserver.stop()node.shutdown()
本文来自:开源中国社区
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product