-
Notifications
You must be signed in to change notification settings - Fork 12
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
Remove Sharding
#929
Remove Sharding
#929
Conversation
Allow to set `TransportFactory` instead of `IntegrationBus` for the `BoundedContextBuilder`. Wire all instances of `BlackBoxBoundedContext` to the same transport in order to allow them to communicate via external events.
Codecov Report
@@ Coverage Diff @@
## master #929 +/- ##
============================================
- Coverage 93.37% 93.02% -0.35%
+ Complexity 3864 3712 -152
============================================
Files 529 508 -21
Lines 12651 12135 -516
Branches 705 675 -30
============================================
- Hits 11813 11289 -524
- Misses 608 623 +15
+ Partials 230 223 -7 |
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.
@armiol, LGTM with a couple of comments to address.
@DisplayName("TransportFactory if it was set") | ||
void transportFactory() { | ||
@SuppressWarnings("unchecked") // OK for this mock. | ||
TransportFactory factory = InMemoryTransportFactory.newInstance(); |
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.
Please fix the alignment.
private final BoundedContext boundedContext; | ||
private final CommandMemoizingTap commandTap; | ||
private final MemoizingObserver<Ack> observer; | ||
|
||
|
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.
This line is redundant.
In a scope of planned
Inbox
feature, the sharding-based approach used up until now becomes obsolete. This PR removes the existing implementation ofSharding
and allows to run tests withoutShardingReset
JUnit extension.Other API changes:
TransportFactory
for theBoundedContextBuilder
, not theIntegrationBus
— to make the transport configuration consistent across multiple bounded contexts.BlackBoxBoundedContext
to the same transport to enable a communication via external events.Minor changes:
@author
tags removed in the updated files.VisibilityGuardTestEnv
cleared from the unused code.BlackBoxBoundedContext
now relies on Java 8 predicate API instead of Guava's for event filtering.The framework version remained intact for now — in light of upcoming
pre3
version.