vendredi 30 octobre 2020

What design pattern to use for switching between Microservices application modules having same endpoints?

In my web application "Payments aggregator" designed as Microservices I have a modules called "user-payments" and "charges-adapter-old". Module "user-payments" refers to "charges-adapter-old" by invoking its method accessible through endpoint "/internal/charges". Module "charges-adapter-old" in its turn refers to external service "Charges" with request for user charges.

In near future "Charges" support team will offer a new specifications for communication with their service. So I would like to add several things into my application:

  • develop a new module "charges-adapter-new" with same endpoint "/internal/charges" as module "charges-adapter-old" has;

  • keep both new and old adapters and be able to switch between them using specific variable in configuration file.

What design pattern and configuration file variables can I apply?

Aucun commentaire:

Enregistrer un commentaire