-
Notifications
You must be signed in to change notification settings - Fork 12
Introduce ByProducerIdOrFirstField as the default event routing
#1610
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
Conversation
ByProducerIdOrFirstField as the default event routing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements miscellaneous improvements including test re-enablement after validation fixes, enhanced event routing capabilities, and documentation updates. The version is bumped from 348 to 349.
Key changes:
- Re-enabled previously disabled validation tests now that TemplateString placeholders are supported
- Added new combined routing strategy
ByProducerIdOrFirstFieldfor more flexible event routing - Enhanced JavaDoc documentation across several classes
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| version.gradle.kts | Version bump to 2.0.0-SNAPSHOT.349 |
| pom.xml | Version bump to 2.0.0-SNAPSHOT.349 |
| dependencies.md | Updated dependency report with new version and timestamp |
| ConstraintViolatedTest.java | Re-enabled test and updated assertions to verify error message content |
| StandTest.java | Re-enabled three nested test classes for query/topic/subscription validation |
| EventValidatorTest.java | Re-enabled event validation test and updated copyright year |
| TransactionTest.java | Re-enabled entity state validation test |
| MessageRouting.kt | Updated comment from "passed" to "given" |
| EventRouting.kt | Added new factory method for combined routing strategy |
| EventRoute.kt | Added new routing method and improved documentation |
| ByProducerIdOrFirstField.kt | New routing strategy class combining producer ID and first field routing |
| ByFirstField.kt | Reformatted JavaDoc formatting |
| EventDispatchingRepository.java | Changed routing to lazy initialization using Supplier |
| AggregateRepository.java | Changed routing to lazy initialization using Supplier |
| TestActorRequestFactory.java | Added comprehensive JavaDoc for all constructors and methods |
server/src/test/java/io/spine/system/server/ConstraintViolatedTest.java
Outdated
Show resolved
Hide resolved
server/src/main/kotlin/io/spine/server/route/ByProducerIdOrFirstField.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
armiol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexander-yevsyukov please see my comment.
server/src/main/kotlin/io/spine/server/route/ByProducerIdOrFirstField.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
server/src/main/kotlin/io/spine/server/route/EventRouting.kt:1
- The
@CanIgnoreReturnValueannotation was removed from bothwithDefault()andwithDefaultByProducerId()methods. This is a breaking change for consumers who may be calling these methods without using the return value. WhilewithDefault()is marked@VisibleForTesting,withDefaultByProducerId()is public API, and removing this annotation could cause ErrorProne or similar static analysis tools to flag existing usages.
/*
This PR implements enhanced event routing capabilities for the default routings.
Notable hanges
ByProducerIdOrFirstFieldfor more flexible event routing.TemplateStringplaceholders are supported.