Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listen on multiple categories #11

Closed
joecoder1021 opened this issue Apr 18, 2017 · 1 comment
Closed

Listen on multiple categories #11

joecoder1021 opened this issue Apr 18, 2017 · 1 comment

Comments

@joecoder1021
Copy link

Interested in polling multiple categories in one call.
Was not sure how to add support to poll multiple categories other than make multiple poll requests.

@joecoder1021 joecoder1021 changed the title Listen on multiple categoreis Listen on multiple categories Apr 18, 2017
@jcuga
Copy link
Owner

jcuga commented Apr 29, 2021

Supporting more than one category in the same subscription request would introduce complexity that I am not able/willing to take on any time soon. I updated the README to call out this limitation.

Perhaps some day I will tackle this, but there is no guarantee.

Doing so would likely involve:

  • having an option (in golongpoll.Options) or whether or not multiple categories per subscription is supported. by default it would be disabled for performance.
  • updating the HTTP API to return a map of category to []Event. Or keep existing []Event since each event json object does have an event.category field. It would be on clients to group the events by category.
  • There is a decent amount of work to do in the internal bookkeeping/logic to support this without creating issues like Events published in same millisecond aren't seen by clients #19. This is the main reason why I do not foresee having time to tackle this at the moment.

@jcuga jcuga closed this as completed Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants