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

Support for conditional message sending #1528

Merged
merged 5 commits into from
Nov 4, 2022

Conversation

alstanchev
Copy link
Contributor

@alstanchev alstanchev commented Nov 2, 2022

  • Only send messages to devices when a specified condition if fulfilled.
  • Ditto's HTTP Messages API supports to specify a "condition" query parameter with an RQL expression.
  • Conditions are applied to the currently known twin/thing state
  • When a condition is not passed, an immediate response is returned (e.g. HTTP 412 pre-condition failed)

Fixes #1363

DerSchwilk and others added 2 commits October 13, 2022 07:43
This should enable the possibility to prevent live message publishing based on the condition header not matching.

Co-authored-by: Stanchev Aleksandar <aleksandar.stanchev@bosch.io>
Signed-off-by: David Schwilk <david.schwilk@bosch.io>
Co-authored-by: Stanchev Aleksandar <aleksandar.stanchev@bosch.io>
Signed-off-by: David Schwilk <david.schwilk@bosch.io>
@thjaeckle thjaeckle added this to the 3.1.0 milestone Nov 2, 2022
Copy link
Contributor

@DerSchwilk DerSchwilk left a comment

Choose a reason for hiding this comment

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

Reviewed as part of co-development

@thjaeckle
Copy link
Member

thjaeckle commented Nov 2, 2022

@alstanchev for the blogpost you added, you will also need to add you to the authors file at https://github.com/eclipse-ditto/ditto/blob/master/documentation/src/main/resources/_data/authors.yml

The handle is the same you use in the "author" field of the blogpost

Aleksandar Stanchev and others added 2 commits November 3, 2022 13:57
Co-authored-by: David Schwilk <david.schwilk@bosch.io>
Signed-off-by: Stanchev Aleksandar <aleksandar.stanchev@bosch.io>
Signed-off-by: Stanchev Aleksandar <aleksandar.stanchev@bosch.io>
@DerSchwilk
Copy link
Contributor

Fixes #1363

Signed-off-by: Stanchev Aleksandar <aleksandar.stanchev@bosch.io>
@alstanchev
Copy link
Contributor Author

@thjaeckle made some redactions on the blog post and also fixed the things that you mentioned above.

@thjaeckle thjaeckle merged commit 6253d44 into eclipse-ditto:master Nov 4, 2022
@thjaeckle thjaeckle deleted the feature/live-condition branch November 4, 2022 15:45
This pull request was closed.
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.

Process/forward messages conditionally based on twin state
3 participants