Move InMemorySubscriber from L2 communication module to L3 client mo…#158
Merged
stevenhartley merged 6 commits intomainfrom Jul 16, 2024
Merged
Move InMemorySubscriber from L2 communication module to L3 client mo…#158stevenhartley merged 6 commits intomainfrom
stevenhartley merged 6 commits intomainfrom
Conversation
…ule. The InMemorySubscriber actually was implementing the client-side of the uSubscription flow by talking to usubscription service, registering a listener (to receive published messages), and setting up a notifier to receive subscription changes. The only L2 item for pub/sub (subscriber) flow was to register a listener with the transport so there is no need to add a wrapper to do that. This change then also implements all the other remaining usubscription client side APIs for developers to use and removes the L2 Subscriber to avoid confusion with this InMemoryUSubscriptionClient implementation. The uProtocol client-side implementations will now reside in the client folder of up-java (ex. uDiscovery & uTwin). #148
|
Code coverage report is ready! 📈
|
|
Code coverage report is ready! 📈
|
…will be done by USubscription service so streamer can register for all notification changes
|
Code coverage report is ready! 📈
|
mishap4
reviewed
Jul 16, 2024
| * @param options the call options to use for the RPC requests | ||
| */ | ||
| public InMemoryUSubscriptionClient (UTransport transport, RpcClient rpcClient, | ||
| Notifier notifier, CallOptions options) { |
There was a problem hiding this comment.
CallOptions contains auth token and it is immutable. When token expires it has to be refreshed, so the current implementation will require to rebuild the whole instance just to update token, I think it is better to pass options into each RPC method.
|
Code coverage report is ready! 📈
|
mishap4
approved these changes
Jul 16, 2024
|
Code coverage report is ready! 📈
|
Contributor
There was a problem hiding this comment.
Add copyright header
| * @param topic The topic to subscribe to. | ||
| * @param listener The listener to be called when a message is received on the topic. | ||
| * @param options The call options for the subscription. | ||
| * @param listener The listener to be called when a messages are received. |
Contributor
There was a problem hiding this comment.
Please remove the article 'a'.
|
Code coverage report is ready! 📈
|
This was referenced Jul 16, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The InMemorySubscriber actually was implementing the client-side of the uSubscription flow by talking to usubscription service, registering a listener (to receive published messages), and setting up a notifier to receive subscription changes. The only L2 item for pub/sub (subscriber) flow was to register a listener with the transport so there is no need to add a wrapper to do that. This change then also implements all the other remaining usubscription client side APIs for developers to use and removes the L2 Subscriber to avoid confusion with this InMemoryUSubscriptionClient implementation. The uProtocol client-side implementations will now reside in the client folder of up-java (ex. uDiscovery & uTwin).
#148