nsq

官网:http://nsq.io

(1)描述

都是message broker,rabbitmq久经考验,nsq则是后起之秀。rabbitmq是erlang编写,nsq是golang。

安装:https://github.com/nsqio/nsq/releases下载nsq-0.3.8.linux-amd64.go1.6.2.tar.gz,可执行文件copy到bin下;windows拷贝到c:windows下

参考文档:

http://www.cnblogs.com/hclabxing/p/6032284.html

http://wiki.jikexueyuan.com/project/nsq-guide/

  • nsqd:一个负责接收、排队、转发消息到客户端的守护进程
  • nsqlookupd:管理拓扑信息并提供最终一致性的发现服务的守护进程
  • nsqadmin:一套Web用户界面,可实时查看集群的统计数据和执行各种各样的管理任务
  • utilities:常见基础功能、数据流处理工具,如nsq_stat、nsq_tail、nsq_to_file、nsq_to_http、nsq_to_nsq、to_nsq

(2)运行demo

http://nsq.io/overview/quick_start.html

或者:(以下配置文件参考自https://github.com/nsqio/nsq/tree/master/contrib)

nsqlookupd -config=/home/wyt/bin/nsqlookupd.cfg
nsqd -config=/home/wyt/bin/nsqd.cfg
nsqadmin -config=/home/wyt/bin/nsqadmin.cfg

注意:把nsqadmin.cfg最后nsqd_http_addresses注释掉

(3)重要配置;安全性:端口和认证

 待补充。。。

(4)常用接口

支持的编程语言:http://nsq.io/clients/client_libraries.html

(5)c语言

https://github.com/nsqio/libnsq

(6)golang

https://github.com/nsqio/go-nsq

(7)javascript

https://github.com/segmentio/nsq.js

原文地址:https://www.cnblogs.com/wjx0912/p/6132501.html