Skip to content

Adding consumer for uSubscription service#292

Closed
agosh01 wants to merge 4 commits intoeclipse-uprotocol:mainfrom
agosh01:feature/add_usubscription_client
Closed

Adding consumer for uSubscription service#292
agosh01 wants to merge 4 commits intoeclipse-uprotocol:mainfrom
agosh01:feature/add_usubscription_client

Conversation

@agosh01
Copy link
Member

@agosh01 agosh01 commented Aug 15, 2024

This PR is to implement consumer api which act as L3 interface for the user to do subscribe request to uSubscription service

Note: Current uSubscription proto file is not usable by C++ as its missing build configuration. In order for this PR to work up-core-api needs to updated. See

@github-actions
Copy link

Code coverage report is ready! 📈

@agosh01 agosh01 force-pushed the feature/add_usubscription_client branch from 4b4518a to 20d3c56 Compare August 15, 2024 15:52
@github-actions
Copy link

Code coverage report is ready! 📈

@agosh01 agosh01 force-pushed the feature/add_usubscription_client branch from 20d3c56 to 38912eb Compare August 15, 2024 15:57
@github-actions
Copy link

Code coverage report is ready! 📈

@agosh01 agosh01 force-pushed the feature/add_usubscription_client branch from 38912eb to cc64305 Compare August 15, 2024 16:00
@github-actions
Copy link

Code coverage report is ready! 📈

@agosh01 agosh01 force-pushed the feature/add_usubscription_client branch from cc64305 to 80ee1f9 Compare August 15, 2024 17:03
@github-actions
Copy link

Code coverage report is ready! 📈

@agosh01 agosh01 force-pushed the feature/add_usubscription_client branch from 80ee1f9 to 692eb81 Compare August 15, 2024 17:22
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: I would move this to include/up-cpp/client/usubscription/v3/SubscriptionClient.h. I'm also tempted to replace "SubscriptionClient" with "Subscriber" or "Consumer" (the publish side would be "Publisher" or "Producer")

///
/// Like all L3 client APIs, the SubscriptionClient is a wrapper on top of the
/// L2 Communication APIs and USubscription service.
struct SubscriptionClient {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm tempted to call this Subscriber or Consumer since client is already in the namespace. Not 100% sure there yet. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

Subscriber may cause confusion between L2 Subscriber just in context of writing and talking.
Might be better to call it Consumer unless Consumer might be used elsewhere too

Comment on lines +55 to +57
SubscriptionResponse getSubscriptionResponse() const {
return subscription_response_;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if this is really needed - we can probably handle the response internally and provide just a status outward. I'll need to think on it a little more.

Copy link
Member Author

@agosh01 agosh01 Aug 15, 2024

Choose a reason for hiding this comment

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

message SubscriptionResponse {
  // Current status of the subscription
  SubscriptionStatus status = 1;

  // Any platform (uDevice) specific additional event delivered configuration
  // information for how the subscriber should consume the published events.
  EventDeliveryConfig config = 2;

  // Subscription topic passed to SubscriptionRequest
  uprotocol.v1.UUri topic = 3;
}

As SubscriptionResponse may contain configuration information which might be critically to consume information. I am not entirely sure tho

@github-actions
Copy link

Code coverage report is ready! 📈

@agosh01 agosh01 force-pushed the feature/add_usubscription_client branch from b8e7a61 to 14215c0 Compare August 19, 2024 18:20
@agosh01 agosh01 changed the title Adding header for subscription client Adding consumer for uSubscription service Aug 19, 2024
@PLeVasseur
Copy link
Contributor

Handled by #305

@PLeVasseur PLeVasseur closed this Mar 3, 2025
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.

3 participants