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

[Proposal] Add PubSub examples over gPRC #825

Closed
MregXN opened this issue Jan 30, 2023 · 0 comments
Closed

[Proposal] Add PubSub examples over gPRC #825

MregXN opened this issue Jan 30, 2023 · 0 comments

Comments

@MregXN
Copy link
Member

MregXN commented Jan 30, 2023

Background

Dapr supports HTTP API and gPRC API when the PubSub component works. But there is only PubSub example over HTTP in the java-sdk repo (What is more, the link of PubSub with subscriber over Http has been 404).

Problem

Some users want to publish/subscribe in their non-web applications. The current examples can't help as the HTTP examples will import web-related dependencies.

Proposal

  • For Subscriber

    • Add a GrpcService class that extends from AppCallbackGrpc.AppCallbackImplBase and implements the interfaces of listTopicSubscriptions and onTopicEvent so that it could interact with daprd via gRPC.
    • Modify DaprApplication to support switching protocals (HTTP or gPRC).
  • For Publisher
    Publisher use DaprClient which will run in different protocols according to system properties. So add codes about modifying system properties about protocols before DaprClient is initialed.

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