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

feat: add pubsub #353

Merged
merged 27 commits into from
Jul 13, 2023
Merged

feat: add pubsub #353

merged 27 commits into from
Jul 13, 2023

Conversation

pgautier404
Copy link
Contributor

@pgautier404 pgautier404 commented Jul 6, 2023

This commit adds pubsub capabilities to the Python SDK via the TopicClient. It also corrects the usage of the @behaves_like decorator throughout the test code, which had been preventing a large number of tests from ever executing.

@pgautier404 pgautier404 force-pushed the add-pubsub branch 2 times, most recently from 54c2cb8 to 5026b9d Compare July 10, 2023 22:21
@pgautier404 pgautier404 force-pushed the add-pubsub branch 5 times, most recently from 2612c05 to 297c450 Compare July 12, 2023 21:43
@pgautier404 pgautier404 marked this pull request as ready for review July 12, 2023 22:25
@pgautier404 pgautier404 force-pushed the add-pubsub branch 2 times, most recently from e2210cb to 96c0c80 Compare July 12, 2023 22:42
Copy link
Contributor

@malandis malandis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. A more idiomatic way to present the subscription to the user would be with generators/async generators. Let's sync up to discuss briefly.

request = pubsub_pb._SubscriptionRequest(
cache_name=cache_name,
topic=topic_name,
# TODO: resume_at_topic_sequence_number
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎗️

request = pubsub_pb._SubscriptionRequest(
cache_name=cache_name,
topic=topic_name,
# TODO: resume_at_topic_sequence_number
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎗️

@pgautier404
Copy link
Contributor Author

Looks good. A more idiomatic way to present the subscription to the user would be with generators/async generators. Let's sync up to discuss briefly.

Excellent suggestion, thanks!

Copy link
Contributor

@malandis malandis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small change otherwise gtg

tests/momento/topic_client/test_topics.py Outdated Show resolved Hide resolved
@pgautier404 pgautier404 merged commit ac7b626 into main Jul 13, 2023
14 checks passed
@pgautier404 pgautier404 deleted the add-pubsub branch July 13, 2023 23:07
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

Successfully merging this pull request may close these issues.

2 participants