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

fix: use just one grpc connection for topics #360

Merged
merged 2 commits into from
Oct 20, 2023
Merged

Conversation

anitarua
Copy link
Contributor

@anitarua anitarua commented Oct 20, 2023

Addresses https://github.com/momentohq/dev-eco-issue-tracker/issues/503

Publish and Subscribe now share grpc connections rather than having one for each.

@@ -27,6 +27,7 @@ func NewStreamTopicGrpcManager(request *models.TopicStreamGrpcManagerRequest) (*
endpoint,
grpc.WithTransportCredentials(credentials.NewTLS(config)),
grpc.WithChainStreamInterceptor(interceptor.AddStreamHeaderInterceptor(authToken)),
grpc.WithChainUnaryInterceptor(interceptor.AddHeadersInterceptor(authToken)),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

adds authorization header to any unary requests made using this connection

momento/pubsub_client.go Outdated Show resolved Hide resolved
Copy link
Contributor

@pgautier404 pgautier404 left a comment

Choose a reason for hiding this comment

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

LGTM!

@anitarua anitarua merged commit 842033e into main Oct 20, 2023
@anitarua anitarua deleted the topics-connections branch October 20, 2023 22:58
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