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

[1.x] Enable IntegrationBroker dispatch events regardless of registration order of subscribing and publishing BCs #1402

Merged
merged 26 commits into from
Oct 21, 2021

Conversation

yevhenii-nadtochii
Copy link
Contributor

@yevhenii-nadtochii yevhenii-nadtochii commented Oct 14, 2021

Now, IntegrationBroker sends out an ExternalMessagesSourceAvailable notification as it registered with a BoundedContext in order to notify other brokers that a new potential contributor is available. Other brokers react on this notification by re-stating their needs of external events by sending a RequestForExternalMessages.

Notes

  1. IntegrationBroker tests were re-written with BlackBoxContext;
  2. One test seemed not to be anyhow related with IntegrationBroker. Instead of checking for UnsupportedExternalMessage as it stated in the title, it was checking for UNSUPPORTED_EVENT_VALUE that is a responsibility of EventBus.
    @DisplayName("emit unsupported external message exception if message type is unknown")
    void throwOnUnknownMessage() throws Exception {
        ....
        assertEquals(UNSUPPORTED_EVENT_VALUE, error.getCode());
    }

Non-related changes

  1. Made BoundedContext.InternalAccess.register*() methods chainable;
  2. Fixing caught typos in javadoc;
  3. EmptyAggregate in server/src/test/proto/spine/test/shared_types.proto had incorrect entity type;
  4. Made BlackBoxContext implement Closeable.

@armiol armiol changed the base branch from 1.7.5-update to 1.x-dev October 15, 2021 15:30
@codecov
Copy link

codecov bot commented Oct 19, 2021

Codecov Report

Merging #1402 (8bf4de1) into 1.x-dev (2cfad47) will decrease coverage by 0.00%.
The diff coverage is 95.65%.

@@              Coverage Diff              @@
##             1.x-dev    #1402      +/-   ##
=============================================
- Coverage      91.05%   91.05%   -0.01%     
- Complexity      4789     4791       +2     
=============================================
  Files            614      614              
  Lines          15185    15201      +16     
  Branches         861      860       -1     
=============================================
+ Hits           13827    13841      +14     
- Misses          1085     1091       +6     
+ Partials         273      269       -4     

@yevhenii-nadtochii yevhenii-nadtochii removed the request for review from armiol October 20, 2021 15:03
Copy link
Contributor

@armiol armiol left a comment

Choose a reason for hiding this comment

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

@yevhenii-nadtochii please see my comments.

Also, next time please mark the PR as "Ready for review". It's in its "Draft" state at the moment.

@armiol
Copy link
Contributor

armiol commented Oct 20, 2021

@yevhenii-nadtochii one more thing. We'll need to bump the library version. I'll show you how to do that.

@yevhenii-nadtochii yevhenii-nadtochii marked this pull request as ready for review October 21, 2021 12:56
@yevhenii-nadtochii yevhenii-nadtochii merged commit 3893bf1 into 1.x-dev Oct 21, 2021
@yevhenii-nadtochii yevhenii-nadtochii deleted the integration-bus-feature branch October 21, 2021 16:00
@armiol armiol changed the title Enable IntegrationBroker dispatch events regardless of registration order of subscribing and publishing BCs [1.x] Enable IntegrationBroker dispatch events regardless of registration order of subscribing and publishing BCs Nov 16, 2021
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.

2 participants