nsqio / nsqio.github.io Goto Github PK
View Code? Open in Web Editor NEWNSQ documentation
Home Page: https://nsq.io
NSQ documentation
Home Page: https://nsq.io
is there a safe way to restart a nsq process? didn't see any mention of this in the documentation.
Hey,
I was just starting out and I noticed that the quick start guide instructs you to open nsqadmin at port 4161 but expects you to connect at 4171 to view the UI. Am I missing something here? apologies in advance if i've got it wrong.
Just wanted to inform you about an error in NSQ QUICK START guide
The example for publishing a message using curl says:
$ curl -d 'hello world 1' 'http://127.0.0.1:4151/put?topic=test'.
This results into an error. The right URL should be "pub" (not "put")
$ curl -d 'hello world 1' 'http://127.0.0.1:4151/pub?topic=test'.
Same error (copy&paste) also in "hello world 2" and "hello world 3".
cheers,
Andreas
nsq-java
pynsq
python setup.py register
go-nsq
nsq
nsqio.github.io
#2 updating links to repos/cc @jehiah
current description about GET /lookup
miss description about response(http status code and http response body),if add more info about response maybe helpful for user(#44 is good).
GET
/lookup
Returns a list of producers for a topic
Request Params:
name | optional | type | location | description |
---|---|---|---|---|
topic | NO | String | Query | the topic to list producers for |
Response Params:
name | type | description |
---|---|---|
channels | List | channels of this topic |
producers | List | producer of this topic |
Producer
name | type | description |
---|---|---|
remote_address | String | |
hostname | String | |
broadcast_address | String | |
tcp_port | Int | |
http_port | Int | |
version | String |
Request example:
curl -i http://localhost:4161/lookup?topic=test
Response example:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Nsq-Content-Type: nsq; version=1.0
{
"channels":[
],
"producers":[
{
"remote_address":"127.0.0.1:56121",
"hostname":"DESKTOP-TJTHRU9",
"broadcast_address":"DESKTOP-TJTHRU9",
"tcp_port":4150,
"http_port":4151,
"version":"1.2.1"
}
]
}
If we think this helpful,i can make a PR to add more description about nsqlookupd's api
see nsqio/nsq#995
Api call for discovery (/lookup?topic=XXX) has been changed in NSQ v1.0.0-compact
Response in NSQ prior to v1.0.0-compact
{ status_code: 200, status_txt: "OK", data: { channels: [ ], producers: [ { remote_address: "127.0.0.1:39310", hostname: "vikash.tiwari", broadcast_address: "vikash.tiwari", tcp_port: 4150, http_port: 4151, version: "0.3.8" } ] } }
Response in NSQ v1.0.0-compact
{ channels: [ "emailChannel" ], producers: [ { remote_address: "127.0.0.1:40258", hostname: "vikash.tiwari", broadcast_address: "vikash.tiwari", tcp_port: 4150, http_port: 4151, version: "1.0.0-compat" } ] }
http://nsq.io/clients/building_client_libraries.html still refers to the former.
Big thanks to all the production users who've allowed us to put their company logo on the README...
I'm curious if there are any more lurkers who watch the repository, run NSQ in production, and might be willing to share their use case / give us permission to add their logo?
😍 💖 ✨
#438 got the ball rolling, but I'd like to add a few more benchmark modes:
Provides clear documentation of each API and how to use them that is not tied to any specific vendor or technology.
There are tools that can consume the spec and generate the server component and the client component. go-swagger
Also tools for displaying the spec as html, and allows for interacting with the API if server is available.
nsqlookupd APIs as example:
https://gist.github.com/kenjones-cisco/5b36a7c54ddd548264178ca657e00bd7
To view an HTML representation of the example nsqlookupd spec provided, copy the yml file into the Swagger Editor to visually see what the documentation could look like.
Tasks:
Considerations:
References:
current:
Defaults to --client-timeout / 2
actually value is 60s
As the document says, topic will be created on first use by subscribing.
Topics are created on first use by publishing to the named topic or by subscribing to a channel on the named topic. Channels are created on first use by subscribing to the named channel.
but it does not.
my environments are as below:
# nsqd -version
nsqd v1.0.1-alpha (built w/go1.10)
# nsqlookupd -version
nsqlookupd v1.0.1-alpha (built w/go1.10)
# nsq_tail -version
nsq_tail v1.0.1-alpha
# nsqadmin -version
nsqadmin v1.0.1-alpha (built w/go1.10)
what did I do?
started nsqd , nsqlookupd and nsqadmin using default params.
then i subscribed a topic to two channels by nsq_tail:
nsq_tail --channel=c1 --topic=test --lookupd-http-address=localhost:4161
nsq_tail --channel=c2 --topic=test --lookupd-http-address=localhost:4161
then I visit http://localhost:4171/
, but i saw no topics there.
after that, I published a message on topic test by to_nsq:
# to_nsq -nsqd-tcp-address=localhost:4150 -topic=test -rate=1
2018/10/24 15:48:12 Throttling messages rate to max:1/second
{}
2018/10/24 15:48:14 INF 1 (localhost:4150) connecting to nsq
after about 40 second, the c1 received the message, but c2 didn't.
here is the output of nsq_tail:
c1:
nsq_tail --channel=c1 --topic=test --lookupd-http-address=localhost:4161
2018/10/24 15:47:53 Adding consumer for topic: test
2018/10/24 15:47:53 INF 1 [test/c1] querying nsqlookupd http://localhost:4161/lookup?topic=test
2018/10/24 15:47:53 ERR 1 [test/c1] error querying nsqlookupd (http://localhost:4161/lookup?topic=test) - got response 404 Not Found "{\"message\":\"TOPIC_NOT_FOUND\"}"
2018/10/24 15:48:58 INF 1 [test/c1] querying nsqlookupd http://localhost:4161/lookup?topic=test
2018/10/24 15:48:58 INF 1 [test/c1] (anjiawei-Vostro-3667:4150) connecting to nsqd
{}
2018/10/24 15:49:58 INF 1 [test/c1] querying nsqlookupd http://localhost:4161/lookup?topic=test
c2:
nsq_tail --channel=c2 --topic=test --lookupd-http-address=localhost:4161
2018/10/24 15:48:04 Adding consumer for topic: test
2018/10/24 15:48:04 INF 1 [test/c2] querying nsqlookupd http://localhost:4161/lookup?topic=test
2018/10/24 15:48:04 ERR 1 [test/c2] error querying nsqlookupd (http://localhost:4161/lookup?topic=test) - got response 404 Not Found "{\"message\":\"TOPIC_NOT_FOUND\"}"
2018/10/24 15:49:14 INF 1 [test/c2] querying nsqlookupd http://localhost:4161/lookup?topic=test
2018/10/24 15:49:14 INF 1 [test/c2] (anjiawei-Vostro-3667:4150) connecting to nsqd
2018/10/24 15:50:14 INF 1 [test/c2] querying nsqlookupd http://localhost:4161/lookup?topic=test
is it a bug ? i expected to create the topic on subscribing, and i expected to receive messages on publishing.
According to the protocol implementation the TLS upgrade is only applied if feature negotiation is enabled as well.
This should be highlighted in the protocol documentation.
Related source: https://github.com/nsqio/nsq/blob/master/nsqd/protocol_v2.go#L392
Unless I'm missing something, I think there's a bunch of extremely handy functionality that's not called out on the website. Specifically, nsqlookupd seems to support a handful of the same HTTP API that nsqd does, though with a couple minor differences. (e.g. /channel/create on nsqlookupd will implicitly create a nonexistent topic, but nsqd will not)
After reading the release notes for v0.3.0 I'm not sure how I can create a ephemeral topic and could not find any reference to it in the documentation.
Any links to this would be useful - thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.