因为是mac 系统安装试用brew install nsq

安装

brew  install nsq

组件说明

  • nsqd
守护进程进行消息的接受,缓存以及传递消息给客户端,需要配置nsqlookupd地址
  • nsqlookupd
守护进程,启动服务的发现,为消息者提供查找nsqd 生产者指定的topic
  • nsqadmin
一个可视化界面,方便进行nsq 的管理以及监控
  • 启动

  • nsqlookupd

nsqlookupd
  • nsqd
nsqd --lookupd-tcp-address=127.0.0.1:4160
  • nsqadmin
 nsqadmin --lookupd-http-address=127.0.0.1:4161
  • 发布初始化消息
curl -d 'hello world 1' 'http://127.0.0.1:4151/pub?topic=test'
  • 启动 nsq_to_file (client)
nsq_to_file --topic=test --output-dir=/tmp --lookupd-http-address=127.0.0.1:4161
  • 发送消息
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'

参考截图

nsq 安装试用
nsq 安装试用
nsq 安装试用

参考资料

https://nsq.io/overview/quick_start.html
https://nsq.io/overview/design.html

 
 
 
 

相关文章:

  • 2022-12-23
  • 2021-09-26
  • 2021-09-09
  • 2021-11-28
  • 2021-12-26
猜你喜欢
  • 2021-09-05
  • 2022-12-23
  • 2021-11-26
  • 2021-09-15
  • 2021-10-11
  • 2021-10-20
相关资源
相似解决方案