zoukankan      html  css  js  c++  java
  • nsq 初试

    nsqlookupd tcp 4160 http 4161
    nsqd 4150
    nsqadmin 4171

    1:安装
    $ brew install nsq
    1) 停止nsq默认的启动
    $ brew services stop nsq

    2:运行nsqlookupd
    $ nsqlookupd

    3:运行nsqd
    $ nsqd --lookupd-tcp-address=127.0.0.1:4160

    4:运行nsqadmin
    $ nsqadmin --lookupd-http-address=127.0.0.1:4161

    5:推送一条消息并创建一个topic
    $ curl -d 'hello world 1' 'http://127.0.0.1:4151/pub?topic=test'

    6:运行nsq_to_file
    $ nsq_to_file --topic=test --output-dir=/tmp --lookupd-http-address=127.0.0.1:4161

    7:推送更多的消息
    $ curl -d 'hello world 2' 'http://127.0.0.1:4151/pub?topic=test'
    $ curl -d 'hello world 3' 'http://127.0.0.1:4151/pub?topic=test'

     来源:

    中文翻译:http://wiki.jikexueyuan.com/project/nsq-guide/nsqd.html

    英文原文:https://nsq.io/overview/quick_start.html

  • 相关阅读:
    hdu 5902 Seam Carving
    hdu 5091 Beam Cannon
    hdu 1542 Atlantis
    hdu 2196 Computer
    第一个爬虫和测试
    排球比赛规则
    第十周博客作业
    科学计算可视化
    用matplotlib绘制图像
    面对对象学习
  • 原文地址:https://www.cnblogs.com/already/p/10280647.html
Copyright © 2011-2022 走看看