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

Enhance subscribing for change notifications by optional filter #149

Closed
thjaeckle opened this issue May 2, 2018 · 0 comments
Closed

Enhance subscribing for change notifications by optional filter #149

thjaeckle opened this issue May 2, 2018 · 0 comments
Assignees
Milestone

Comments

@thjaeckle
Copy link
Member

When currently subscribing for Events/change notifications via

  • WebSocket
  • SSE
  • Connectivity

the consumer always gets all change notifications it is allowed to see.

On SSE this can be reduced by providing specific thingIds and fields so that changes are only published if the thingId match or a change was affected by a specified field.

The subscription should and could be more fine-grained.
The idea is to support adding an optional filter defined via Ditto's RQL syntax it already uses for the search.

That way the following subscription rules could be applied:

  • notify me of a change only if the thingId starts with org.eclipse.ditto:* : like(thingId,"org.eclipse.ditto:*")
  • notify me of a change only if the feature temperature was affected by this change: exists(feature/temperature)
  • notify me of a change only if in one change the temperature was greater 25: gt(feature/temperature/properties/value,25)
  • notify me of changes in the namespace org.eclipse.ditto:* affecting the temperature: and(like(thingId,"org.eclipse.ditto:*"),exists(feature/temperature))
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