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

Add Subscription type to the API #75

Closed
wallyqs opened this issue Aug 20, 2018 · 1 comment
Closed

Add Subscription type to the API #75

wallyqs opened this issue Aug 20, 2018 · 1 comment
Milestone

Comments

@wallyqs
Copy link
Member

wallyqs commented Aug 20, 2018

The subscription methods were modeled after the original Ruby client:

  # Simple publisher and async subscriber via coroutine.
  sid = await nc.subscribe("foo", cb=message_handler)

  # Stop receiving after 2 messages.
  await nc.auto_unsubscribe(sid, 2)

but similar as with other clients, we should change the API so that it is more consistent with the Go client:

  sub = await nc.subscribe("foo", cb=message_handler)
  await sub.auto_unsubscribe(2)
  await sub.unsubscribe()
@wallyqs wallyqs added this to the v1.0.0 milestone Aug 20, 2018
@wallyqs
Copy link
Member Author

wallyqs commented Sep 22, 2020

Added to v1-dev branch here: #175

@wallyqs wallyqs closed this as completed Sep 22, 2020
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

1 participant