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 ...
随机推荐
- JS 下拉菜单
HTML <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <titl ...
- SQL注入小结
分类学习有利于条理化知识,大致的SQL注入分为三种: 1.BealeanBase 2.TimeBase 3.ErrorBase 1.从最简单的说起,基于布尔类型是最常见的SQL注入方式 select ...
- 配置 Apache+php多端口多站点(转载)
配置httpd.conf监听多个端口 #增加监听端口 等以下内容都设置以后,可以通过 netstat -n -a查看端口是否开启 开启虚拟站点 # Virtual hosts#Include conf ...
- SQL里的EXISTS与in、not exists与not in
系统要求进行SQL优化,对效率比较低的SQL进行优化,使其运行效率更高,其中要求对SQL中的部分in/not in修改为exists/not exists 修改方法如下: in的SQL语句 SELEC ...
- Swig 使用指南
如何使用 API swig.init({ allowErrors: false, autoescape: true, cache: true, encoding: 'utf8', filters: { ...
- Web SQL数据库
Web SQL数据库:它是一个独立的规范,引入了一组使用SQL操作客户端数据库的API. openDatabase方法:这个方法使用现有的数据库或者新建的数据库创建一个数据库对象.如果数据库存在,op ...
- linux配置ant
第1步:下载ant ,地址:http://ftp.twaren.net/Unix/Web/apache//ant/binaries/apache-ant-1.9.6-bin.tar.gz apache ...
- MySQL数据库InnoDB引擎下服务器断电数据恢复
说明: 线上的一台MySQL数据库服务器突然断电,造成系统故障无法启动,重新安装系统后,找到之前的MySQL数据库文件夹. 问题: 通过复制文件的方式对之前的MySQL数据库进行恢复,发现在程序调用时 ...
- Ninject学习笔记<二>
本文转载自kuangkro 如果给您带来不便请联系博主 一.控制反转和依赖注入 Ninject是一个轻量级的基于.Net平台的依赖注入(IOC)框架.所谓的IOC,即控制反转(Inversion of ...
- makefile文件编写
文件转载自:http://www.cppblog.com/lapcca/archive/2010/11/26/134714.html 下面这篇文章讲的很清楚,基本的用法也很简单. 一.Makefi ...