-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: pubsub mvp #347
feat: pubsub mvp #347
Conversation
Implement a new top-level client for interacting with topics. Implement internal pubsub client for interacting with the pubsub service.
In the current form, the end-user has no way to close a subscription stream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is looking great to me. Let's get @allenheltondev to weigh in on the example syntax / callback naming. Then just a few nits to clean up and we can merge this and deal with the rest in follow-ups.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to split the examples out to a separate PR and revert the ..
in the examples package.json but other than that I'm good to go on this
Move examples to separate PR for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you for updating the function names to onItem
and onError
!
TopicClient
for publishing and subscribing to topicsPubsubClient
for abstracting calls to the pubsub serviceexamples/topic-publish.ts
andexamples/topic-subscribe.ts
To run the example:
For example:
npm run topic-subscribe my-cache dogs # in another terminal npm run topic-publish my-cache dogs poodle npm run topic-publish my-cache dogs corgi