Mac OS X 上的安装nsq并使用
安装:
brew install nsq
使用:
The following steps will run a small NSQ cluster on your local machine and walk through publishing, consuming, and archiving messages to disk. follow the instructions in the INSTALLING doc. in one shell, start nsqlookupd: $ nsqlookupd in another shell, start nsqd: $ nsqd --lookupd-tcp-address= in another shell, start nsqadmin: $ nsqadmin --lookupd-http-address= publish an initial message (creates the topic in the cluster, too): $ curl -d 'hello world 1' 'http://127.0.0.1:4151/put?topic=test' finally, in another shell, start nsq_to_file: $ nsq_to_file --topic=test --output-dir=/tmp --lookupd-http-address= publish more messages to nsqd: $ curl -d 'hello world 2' 'http://127.0.0.1:4151/put?topic=test' $ curl -d 'hello world 3' 'http://127.0.0.1:4151/put?topic=test' to verify things worked as expected, in a web browser open http://127.0.0.1:4171/ to view the nsqadmin UI and see statistics. Also, check the contents of the log files (test.*.log) written to /tmp. The important lesson here is that nsq_to_file (the client) is not explicitly told where the test topic is produced, it retrieves this information from nsqlookupd and, despite the timing of the connection, no messages are lost.
参考地址:
http://nsq.io/overview/quick_start.html
控制台:
http://127.0.0.1:4171/counter

Mac OS X 上的安装nsq并使用的更多相关文章
- Sqlite在Windows、Linux 和 Mac OS X 上的安装过程
一:在 Windows 上安装 SQLite 1,下载 请访问SQLite下载页面http://www.sqlite.org/download.html,从Windows 区下载预编译的二进制文件.需 ...
- Swig在Mac OS X上的安装
网上有很多类似文章介绍Swig怎么在Mac OS X上安装和配置,一般来说就是: 下载pcre,configure & make & make install 下载swig,confi ...
- Mac OS X 上的安装Lisp开发环境
到网站:https://common-lisp.net/project/lispbox/ 下载lispbox 解压下载下来的包,找到Emacs 测试: 我们也可以使用homebrew来安装lisp的解 ...
- Mac OS X 上的安装Lua开发环境
测试Lua环境是否已经安装: adeMacBook-Pro:perl_dev apple$ lua -bash: lua: command not found 如果没有的话就到lua官方去下载:(网址 ...
- Mac OS X 上的安装haskell开发环境
到haskell官方下载haskell的工具包: https://downloads.haskell.org/~platform/2014.2.0.0/Haskell%20Platform%20201 ...
- Mac OS X 上安装 ASP.NET 5
在Mac OS X Yosemite 10.10.3 中搭建第一个 ASP.NET 5 Web 项目 终于有时间在 Mac 上安装一下 ASP.NET 5,网上有许多教程,但是多数的时间比较早了,版本 ...
- 如何在Mac OS X上安装 Ruby运行环境
对于新入门的开发者,如何安装 Ruby和Ruby Gems 的运行环境可能会是个问题,本页主要介绍如何用一条靠谱的路子快速安装 Ruby 开发环境.此安装方法同样适用于产品环境! 系统需求 首先确定操 ...
- Mac OS X上安装 Ruby运行环境
环境 对于新入门的开发者,如何安装 Ruby和Ruby Gems 的运行环境可能会是个问题,本页主要介绍如何用一条靠谱的路子快速安装 Ruby 开发环境.此安装方法同样适用于产品环境! 系统需求 ...
- 在 Mac OS X 上安装 TensorFlow
在 Mac OS X 上安装 TensorFlow 这个文档说明了如何在 Mac OS X 上安装 TensorFlow. 注意:从 1.2 版本开始,在 Mac OS X 上 TensorFlow ...
随机推荐
- UVa OJ 194 - Triangle (三角形)
Time limit: 30.000 seconds限时30.000秒 Problem问题 A triangle is a basic shape of planar geometry. It con ...
- MyBatis查询传一个参数时报错:There is no getter for property named 'sleevetype' in 'class java.lang.Integer
用MyBatis进行查询,传入参数只有一个时(非Map)如int,报错 There is no getter for property named 'sleevetype' in 'class jav ...
- 论文的构思!姚小白的html5游戏设计开发与构思----给审核我论文的导师看的
此处只为笔记 游戏么基本上确定是用canvas做个能一只手玩的游戏!基本打飞机之类的.毕竟手机也就上下班玩玩的.上下班么基本就是一只手拉着扶手一只手撸啊撸! 当然啦,如果能搞出超级牛逼的游戏,比如刺客 ...
- Telnet是什么?
Telnet协议是 用途一: 测试端口号 例子:测试本机的80端口是否打开 1.获得本机IP dos命令:ipconfig 可以看到本机的IP地址是192.168.0.102,当然这也是局域网IP,并 ...
- iOS上传应用过程中出现的错误"images contain alpha channels or transparencies"以及解决方案
如何取消图片透明度 本文永久地址为 http://www.cnblogs.com/ChenYilong/p/3989954.html,转载请注明出处. 当你试图通过<预览>进行" ...
- dedecms如何自定义专题模板
很多人看到别人的网站也是用dedecms建的,但是他们的专题做得很漂亮,也在想如何自定义dedecms专题模板呢? 其实很简单,只要在dedecms默认专题模板上做一些修改就好了 <!DOCTY ...
- Coursera台大机器学习课程笔记14 -- Validation
这节课是接着上节的正则化课程的,目的也是为了防止overfitting. 第一小节讲了模型的选择,前面讲了很多模型,那么如何做出正确的选择呢?我们的目标是选择最小的Eout目标函数.首先应避免视觉化选 ...
- [ruby on rails] 跟我学之(6)显示指定数据
根据<[ruby on rails] 跟我学之路由映射>,我们知道,可以访问 GET /posts/:id(.:format) 来显示具体的对象. 1. 修改action 修改 ap ...
- BZOJ 1455
STL的基本用法 (居然能空间卡过去= =!!!) #include <cstdio> #include <ext/pb_ds/priority_queue.hpp> #inc ...
- 夏令时 DST (Daylight Saving Time) java中的夏令时【转】
1916年,德国首先实行夏令时,英国因为怕德国会从中得到更大的效益,因此紧跟着也采取了夏令时 1986年至1991年,中华人民共和国在全国范围实行了六年夏令时 サマータイム 夏時間(日本现在没有实行夏 ...