Learn More, Pay Less!
Limited Time Offer!
Open Closed

How to conditionally inject modules to API Gateway #8667


User avatar
0
pradeep.pradyumna created
  • ABP Framework version: 8.3.0
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Present scenario: Currently our solution, we are using three microservices say ms1, ms2 and ms3 and one API gateway project. We are injecting EntityFrameworkCoreModule and ContractsModule of all 3 microservices inside gateway. Inside dependson[] we have 3 pairs of EntityFrameworkCoreModule and ContractsModule along with other abp dependencies.

Problem statement: We're building a new module that requires a new microservices ms4. Now, we only want inject dependencies of ms4 to gateway, and remove references of ms1, ms2 and ms3. Doing so, gives us an error since these gateway requires references of ms1, ms2 and ms3 to enable its features/ permissions at the time of application load.

Expectation: I want build and deploy my solution containing just gateway and ms4. I don't want to deploy ms1, ms2 and ms3. How can I inject ms4 alone? If it really required to inject ms1, ms2 and ms3, can I do it conditionally?


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    As you know, the microservices solution needs to load data, permissions, users, tenants, etc. from different services. If the service is missing, the solution cannot work normally.

    If you want to only dependency to one service, you need to add the functionality of all the other services to this one

Made with ❤️ on ABP v9.2.0-preview. Updated on February 10, 2025, 13:23