-
Notifications
You must be signed in to change notification settings - Fork 14
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
Move InMemorySubscriber from L2 communication module to L3 client mo… #158
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! 📈
|
* @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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.
ok fixed
Code coverage report is ready! 📈
|
Code coverage report is ready! 📈
|
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.
Add copyright header
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.
done
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.
done
@@ -98,8 +115,8 @@ public InMemorySubscriber (UTransport transport, RpcClient rpcClient, Notifier n | |||
* subscribed to said topic. | |||
* | |||
* @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. |
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.
Please remove the article 'a'.
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.
done
Code coverage report is ready! 📈
|
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.
LGTM
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