eclipse-uprotocol / up-spec

uProtocol Specifications
Apache License 2.0
31 stars 25 forks source link

Subscription Wildcard Support #203

Closed stevenhartley closed 3 weeks ago

stevenhartley commented 1 month ago

Possible use cases:

  1. uAuthority Wildcard: Subscribe to a specific service topic running on any device (example the same power manager service running on multiple devices)
  2. Resource ID Wildcard: Subscribe to all topics published by a producer
  3. uE Version Wildcard: Subscribe to a specific resource_id from any version of the ue
sophokles73 commented 1 month ago

uE Version Wildcard: Subscribe to a specific resource_id from any version of the ue

While I can see that a uEntity might indeed want to subscribe to different versions of a resource, I wonder if the best option is really to use a wildcard for the version in this case. The version reflects the major version of the service only, i.e. the messages that are being published on the corresponding topic will not be compatible and will require different handling logic. Instead of implementing this in a single handler, it seems more reasonable to me to register different handlers for different (incompatible) versions of the topic. That way, there is better separation of concerns in the code.

sophokles73 commented 1 month ago

uAuthority Wildcard: Subscribe to a specific service topic running on any device (example the same power manager service running on multiple devices)

I guess the only issue with this might be how the uSubscription service and Streamers might handle this. Which remote uSubscription service does the local uSubscription service need to inform about the subscribed topics?

stevenhartley commented 3 weeks ago

closing till this is asked from a customer with real requirements