POST /pub?topic=topicName
curl -d "<message>" http://127.0.0.1:8080/pub?topic=topicName
sub
GET /sub?topic=topicName&channel=channelName
GET /stats
channel operations
POST /channel/create?topic=topicName&channel=channelName
POST /channel/pause?topic=topicName&channel=channelName
POST /channel/unpause?topic=topicName&channel=channelName
POST /channel/empty?topic=topicName&channel=channelName
POST /channel/delete?topic=topicName&channel=channelName
install
go get github.com/littlexiang/nsq-http-sub
usage
➜ nsq-http-sub git:(master) ✗ ./nsq-http-sub --help
Usage of ./nsq-http-sub:
-http-address string
<addr>:<port> to listen on for HTTP clients (default "0.0.0.0:8080")
-lookupd-http-address value
lookupd HTTP address (may be given multiple times)
-max-in-flight int
max number of messages to allow in flight (default 100)
-max-messages int
return if got N messages in a single poll (default 1)
-timeout int
return within N seconds if maxMessages not reached (default 10)