nsq

nsqd -http-address -max-body-size -tcp-address -mem-queue-size



curl -d 'hello world 2' 'http://127.0.0.1:4151/pub?topic=test'

nsqd 默认tcp 4150 http 4151
nsqadmin.exe -nsqd-http-address=127.0.0.1:4151 默认 http 4171

get
/ping - liveness
/info - version
/stats - comprehensive runtime telemetry
/pub - publish a message to a topic
/mpub - publish multiple messages to a topic
/config - configure nsqd
/debug/pprof - pprof debugging portal
/debug/pprof/profile - generate pprof CPU profile
/debug/pprof/goroutine - generate pprof goroutine profile
/debug/pprof/heap - generate pprof heap profile
/debug/pprof/block - generate pprof blocking profile
/debug/pprof/threadcreate - generate pprof OS thread profile
v1 namespace (as of nsqd v0.2.29+):

post
/topic/create - create a new topic
	curl -X POST http://127.0.0.1:4151/topic/create?topic=nam
/topic/delete - delete a topic
	curl -X POST http://127.0.0.1:4151/topic/delete?topic=name
/topic/empty - empty a topic
	curl -X POST http://127.0.0.1:4151/topic/empty?topic=name
/topic/pause - pause message flow for a topic
	curl -X POST http://127.0.0.1:4151/topic/pause?topic=name
/topic/unpause 恢复消息流到现有的、暂停的、主题的通道
	curl -X POST http://127.0.0.1:4151/topic/unpause?topic=name
/channel/create - create a new channel
	curl -X POST http://127.0.0.1:4151/channel/create?topic=name&channel=name
/channel/delete - delete a channel
	curl -X POST http://127.0.0.1:4151/channel/delete?topic=name&channel=name
/channel/empty - empty a channel
	curl -X POST http://127.0.0.1:4151/channel/empty?topic=name&channel=name
/channel/pause - pause message flow for a channel
	curl -X POST http://127.0.0.1:4151/channel/pause?topic=name&channel=name
/channel/unpause - unpause message flow for a channel
	curl -X POST http://127.0.0.1:4151/channel/unpause?topic=name&channel=name
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值