Giter VIP home page Giter VIP logo

nsqio.github.io's People

Contributors

andyxning avatar aohan237 avatar atombrella avatar atugushev avatar bgeisberger avatar bilxio avatar brainlag avatar dselivanov avatar harlow avatar harporoeder avatar jehiah avatar judwhite avatar kenjones-cisco avatar kix avatar mreiferson avatar pilwon avatar ploxiln avatar ritaswc avatar ryanslade avatar sidvenu avatar spruce avatar sricola avatar stephensearles avatar suzaku avatar talam avatar victorabarros avatar victorquinn avatar wtolson avatar yerstd avatar zieckey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nsqio.github.io's Issues

nsqio move

/cc @jehiah

docs:add more detail about nsqlookupd http api

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

docs: not updated for v1.0.0-compact changes

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.

docs: more production users?!?!

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?

😍 💖 ✨

docs: even more benchmarks

#438 got the ball rolling, but I'd like to add a few more benchmark modes:

  • varying numbers of topics/channels
  • varying numbers of producers/consumers
  • varying size of message
  • latency measurements
  • writing to diskqueue

docs: openapi specs

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:

  • Create API spec for nsqd
  • Create API spec for nsqlookupd
  • Create API spec for nsqadmin
  • Use specs for documentation on http://nsq.io

Considerations:

  • Apply REST API patterns for APIs
  • Evaluate code generation for Server components
  • Evaluate code generation for Client components

References:

docs: clarify when topics are created automatically

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.

nsqlookupd is missing a bunch of http api documentation

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)

docs: missing ephemeral topics

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.