SpineEventEngine / core-java

The Java implementation of the framework core
https://spine.io
Apache License 2.0
36 stars 12 forks source link

[1.x] Import events from 3rd-party with respect for tenancy #1503

Closed armiol closed 1 year ago

armiol commented 1 year ago

When it comes about importing the third-party events, the framework provides a ThirdPartyContext tool.

However, in a multi-tenant application, the imported events were dispatched in a straightforward manner, without specifying the TenantId via TenantAwareRunner.

The corresponding test was also flawed: in fact, it was dispatching the events to a single-tenant Bounded Context.

This PR addresses the issue by fixing the test and making IntegrationBroker (an intermediary between ThirdPartyContext and "domestic" Bounded Contexts) to explicitly use TenantAwareOperation during the event dispatch.

armiol commented 1 year ago

@yevhenii-nadtochii PTAL.