-
Notifications
You must be signed in to change notification settings - Fork 225
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
Use namespaces and rql filter for event subscriptions #232
Merged
thjaeckle
merged 41 commits into
eclipse-ditto:master
from
bosch-io:feature/rql-event-subscriptions
Sep 17, 2018
Merged
Use namespaces and rql filter for event subscriptions #232
thjaeckle
merged 41 commits into
eclipse-ditto:master
from
bosch-io:feature/rql-event-subscriptions
Sep 17, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…in the backend * moved services-thingsearch-query-model to model-query (removed all non-model dependencies) * removed Bson dependencies from model * added a default Predicate<Thing> based implementation "ThingPredicateVisitor" * added unit tests for testing this implementation * added to StreamingSessionActor that an "eventFilter" may be specified in order to filter events * used in both WebsocketRoute and SseThingsRoute * enhanced DummyAuthenticationProvider in order to specify dummy-auth also as HTTP query param Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
# Conflicts: # services/gateway/endpoints/src/main/java/org/eclipse/ditto/services/gateway/endpoints/routes/sse/SseThingsRoute.java # services/gateway/endpoints/src/main/java/org/eclipse/ditto/services/gateway/endpoints/routes/websocket/WebsocketRoute.java # services/gateway/streaming/src/main/java/org/eclipse/ditto/services/gateway/streaming/actors/StreamingSessionActor.java
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
# Conflicts: # model/query/src/main/java/org/eclipse/ditto/model/query/filter/EnsureMonotonicityVisitor.java # model/query/src/main/java/org/eclipse/ditto/model/query/filter/ParameterOptionVisitor.java # model/query/src/main/java/org/eclipse/ditto/model/query/filter/ParameterPredicateVisitor.java # model/query/src/main/java/org/eclipse/ditto/model/query/model/criteria/CriteriaFactoryImpl.java # model/query/src/main/java/org/eclipse/ditto/model/query/model/criteria/ExistsCriteriaImpl.java # model/query/src/main/java/org/eclipse/ditto/model/query/model/expression/FeatureIdPropertyExpressionImpl.java # model/query/src/main/java/org/eclipse/ditto/model/query/model/expression/PolicyRestrictedFieldExpression.java # model/query/src/main/java/org/eclipse/ditto/model/query/model/expression/SortFieldExpression.java # model/query/src/main/java/org/eclipse/ditto/model/query/model/expression/ThingsAclFieldExpressionImpl.java # model/query/src/main/java/org/eclipse/ditto/model/query/model/expression/ThingsGlobalReadsFieldExpressionImpl.java # model/query/src/test/java/org/eclipse/ditto/model/query/filter/ParameterOptionVisitorTest.java # model/query/src/test/java/org/eclipse/ditto/model/query/filter/ParameterPredicateVisitorTest.java # services/gateway/endpoints/src/main/java/org/eclipse/ditto/services/gateway/endpoints/routes/sse/SseThingsRoute.java # services/gateway/streaming/src/main/java/org/eclipse/ditto/services/gateway/streaming/actors/StreamingSessionActor.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/criteria/visitors/ContainsAllRequiredResourcesVisitor.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/criteria/visitors/CreateBsonPredicateVisitor.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/criteria/visitors/CreateUnwoundBsonVisitor.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/expression/visitors/CreateUnwoundBsonFieldVisitor.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/expression/visitors/GetExistsBsonVisitor.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/expression/visitors/GetFieldIdentifierVisitor.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/expression/visitors/GetFilterBsonVisitor.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/expression/visitors/GetPolicyRestrictionBsonVisitor.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/expression/visitors/GetSortBsonVisitor.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/expression/visitors/GetUnwoundExistsFilterBsonVisitor.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/expression/visitors/IsInternalViewVisitor.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/AbstractPredicateTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/AndCriteriaImplTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/AnyCriteriaImplTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/CriteriaFactoryImplTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/EqPredicateImplTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/ExistsCriteriaImplTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/FieldCriteriaImplTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/GePredicateImplTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/GtPredicateImplTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/LtPredicateImplTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/NePredicateImplTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/NorCriteriaImplTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/query/model/criteria/OrCriteriaImplTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/read/AggregationPolicyAuthIT.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/read/query/MongoQueryBuilderFactoryTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/read/query/MongoQueryBuilderLimitedTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/read/query/MongoQueryBuilderUnlimitedTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/read/query/PolicyRestrictedMongoSearchAggregationTest.java # services/thingsearch/starter/src/main/java/org/eclipse/ditto/services/thingsearch/starter/actors/SearchActor.java
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
# Conflicts: # services/connectivity/messaging/pom.xml # services/connectivity/messaging/src/main/java/org/eclipse/ditto/services/connectivity/messaging/MessageMappingProcessorActor.java # services/gateway/endpoints/src/main/java/org/eclipse/ditto/services/gateway/endpoints/routes/websocket/WebsocketRoute.java # services/gateway/streaming/src/main/java/org/eclipse/ditto/services/gateway/streaming/actors/StreamingSessionActor.java
… msg Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
# Conflicts: # model/connectivity/src/main/java/org/eclipse/ditto/model/connectivity/ConnectivityModelFactory.java # model/connectivity/src/main/java/org/eclipse/ditto/model/connectivity/ExternalMessage.java # model/connectivity/src/main/java/org/eclipse/ditto/model/connectivity/ExternalMessageBuilder.java # model/connectivity/src/main/java/org/eclipse/ditto/model/connectivity/ImmutableExternalMessage.java # model/connectivity/src/main/java/org/eclipse/ditto/model/connectivity/ImmutableTarget.java # model/connectivity/src/main/java/org/eclipse/ditto/model/connectivity/MutableExternalMessageBuilder.java # model/connectivity/src/main/java/org/eclipse/ditto/model/connectivity/Target.java # model/connectivity/src/main/java/org/eclipse/ditto/model/connectivity/Topic.java # model/connectivity/src/test/java/org/eclipse/ditto/model/connectivity/ImmutableExternalMessageTest.java # model/connectivity/src/test/java/org/eclipse/ditto/model/connectivity/ImmutableTargetTest.java # services/connectivity/mapping/src/main/java/org/eclipse/ditto/services/connectivity/mapping/DittoMessageMapper.java # services/connectivity/messaging/src/main/java/org/eclipse/ditto/services/connectivity/messaging/BasePublisherActor.java # services/connectivity/messaging/src/main/java/org/eclipse/ditto/services/connectivity/messaging/ConnectionActor.java # services/connectivity/messaging/src/test/java/org/eclipse/ditto/services/connectivity/messaging/TestConstants.java # services/gateway/endpoints/src/main/java/org/eclipse/ditto/services/gateway/endpoints/routes/sse/SseThingsRoute.java # services/gateway/streaming/src/main/java/org/eclipse/ditto/services/gateway/streaming/actors/StreamingSessionActor.java
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
* and fixed StreamingSessionActor which did not treat twin/live correctly Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
# Conflicts: # model/query/src/main/java/org/eclipse/ditto/model/query/model/query/QueryConstants.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/query/MongoAggregationBuilderFactory.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/query/MongoQueryBuilder.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/query/MongoQueryBuilderFactory.java # services/thingsearch/persistence/src/main/java/org/eclipse/ditto/services/thingsearch/persistence/read/query/PolicyRestrictedMongoSearchAggregation.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/read/PagingIT.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/read/query/MongoQueryBuilderFactoryTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/read/query/MongoQueryBuilderLimitedTest.java # services/thingsearch/persistence/src/test/java/org/eclipse/ditto/services/thingsearch/persistence/read/query/MongoQueryTest.java # services/thingsearch/starter/src/main/java/org/eclipse/ditto/services/thingsearch/starter/actors/SearchActor.java
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Philipp Michalski <Philipp.Michalski@bosch-si.com>
connectivity model Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
# Conflicts: # model/connectivity/src/main/java/org/eclipse/ditto/model/connectivity/ImmutableTarget.java # model/connectivity/src/test/java/org/eclipse/ditto/model/connectivity/UnmodifiableExternalMessageTest.java # services/gateway/endpoints/src/main/java/org/eclipse/ditto/services/gateway/endpoints/routes/sse/SseThingsRoute.java # services/gateway/endpoints/src/main/java/org/eclipse/ditto/services/gateway/endpoints/routes/websocket/WebsocketRoute.java # signals/commands/thingsearch/pom.xml
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Philipp Michalski <Philipp.Michalski@bosch-si.com>
…sch-si.com/stash/scm/ditto/ditto into feature/rql-event-subscriptions
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
…bsinno/ditto into feature/rql-event-subscriptions
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Philipp Michalski <Philipp.Michalski@bosch-si.com>
… new module ditto-model-rql * in order to not have an unwanted ditto-model-thingsearch dependency if only RQL is required * fixed package structure which had "model" twice in its path * moved InvalidRqlExpressionException to ditto-model-rql Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
when RQL was invalid Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
* in ge, gt, le, lt - where Comparable is used * try to convert them to BigDecimal and compare them * if that fails, in the last effort, compare their string representations Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
Pair-Reviewed together with @phalski |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes: #149
When subscribing for events at all Ditto streaming APIs (SSE, WebSocket, connectivity) optionally following parameters can now be specified:
namespaces
: a comma separated list of namespaces to filter (so e.g. only events from those namespaces are emitted)filter
: a RQL filter of which events to emit (as described in Enhance subscribing for change notifications by optional filter #149)