question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reader subscribed to specific topic and channel,need to get only for specified channel.

See original GitHub issue

nsq.Reader('sample_topic1', 'channel1'

but when request: http://localhost:4151/pub?channel=sample_topic1&topic=channel4 , i expect to receive in reader messages for channel1, but i also got this one for channel4. Is there ability to tell the reader to accept messages only for subscribed channel? How this feature should be implemented? Also i think that i dont understand the purpose of channels, i also created so question here http://stackoverflow.com/questions/43836244/what-is-nsq-channels-stands-for

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
dudleycarrcommented, May 9, 2017

When you create a Reader, you have to specify both a topic and a channel, and so that Reader is specific to that topic, channel pair.

One helpful way of thinking of topic and channels is to thinking of topics as a collection of things and channels as the action you want to take on the things. For a given thing (topic message), you might want to do more than one action. Let’s say you received a message with a URL in it. You want to store that URL in a database and independently you want to download that URL and save it to disk. You should have two different Readers on different channels for each of those actions, one for saving to the DB and the other for fetching/saving to the file system. The benefit is that if your database is slow, those messages will be processed at a different rate than the other Reader that’s fetching and storing to disk. A contrived example, but hopefully makes the point.

0reactions
dudleycarrcommented, May 31, 2017

@newasmod Hope you managed to get sorted with nsqd terminology. Closing since I don’t think there’s an issue here with nsqjs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Subscribe to a Channel Field Feed - ThingSpeak - MathWorks
Subscribe to channel updates from specific field of channel with MQTT ... subscribes to updates to all fields of a channel feed from...
Read more >
Phoenix: Only allow subscription to one sub topic on a ...
From your comments it sounds like you are trying to join 1 channel per route, and you want to switch channels when the...
Read more >
Follow or unfollow channels and topics in Apple News
Follow a channel or topic on your iPhone. Browse for a channel or topic in the Following tab or search in the Search...
Read more >
Does Each Social Media Channel Need Its Own Content ...
The somewhat unsatisfying answer is: It depends, but probably. What does it depend on? The uniqueness of your content should rely on the ......
Read more >
How many videos will my YouTube channel need before it ...
If you want to make YouTube videos about something in particular, ... just because you get views, doesn't mean they will subscribe and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found