Running a Microservice Route - Cloud

Talend Cloud API Services Platform Studio User Guide

author
Talend Documentation Team
EnrichVersion
Cloud
EnrichProdName
Talend Cloud
task
Design and Development
EnrichPlatform
Talend Management Console
Talend Studio

This section will show you how to run a Route that is built as a Spring-boot based Microservice.

To run a Route that is exported as a .jar file, proceed as follows in a console window:

  1. Change to the directory where the Microservice .jar file is located.

  2. Type in the following command. For more information about the Spring Boot properties, see the site http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html. Note that not all of the properties listed on the web page are applicable to the ESB Microservice. It depends primarily on the features that are included by Talend and also the Routes you build.

    java -jar <ArchiveFileName> --<SpringBootProperty>

    For example, the following command executes a Microservice named demoRoute.0.1.jar using an environment property that is configured in the file Prod, where Prod is also the Talend context name. This parameter needs to be specified to switch between context properties.

    java -jar demoRoute.0.1.jar --spring.config.name=Prod

    By default, when running the Microservice Route, it calls the configuration files in the /config folder inside the Microservice jar. You can switch to an external configuration folder where the configuration files are located using the spring.config.additional-location property. For example, the following command executes the Microservice named demoRoute.0.1.jar using the configuration files in the config folder in the directory where the Microservice jar is located.

    java -jar demoRoute.0.1.jar --spring.config.additional-location=./config

To run a Route that is exported as a .zip file, proceed as follows:

  1. Extract the .zip file in the directory of your choice.

  2. Go to the <RouteName> folder that contains the external config folder, the Microservice .jar file, and the start scripts to start the Microservice for Linux (.sh) and Windows (.bat).

  3. Edit the configuration files in the config folder as needed and run the .sh file on Linux or the .bat file on Windows to start the Microservice with the external configurations.

For more information about how to build a Route to a ESB Microservice, see Building a Route to a Spring-boot based ESB Microservice.