Job Routing is a mechanism for sending specific jobs to specific FME Engines. The reasons for doing this include:
Job routing uses tags to assign jobs to a subset of available FME Engines. With tags, you can associate specific jobs with certain engines, or associate all jobs in a repository with certain engines.
The first step in configuring job routing is determining the names of the FME Engine instances.
To redirect a job to a specific FME Engine, you must know the FME Engine's name. To determine the name:
You can configure the FME Server Core to direct jobs with specific tag to specific FME Engines. To do so:
Under "Job Routing" (at the very end of the file, under "FME SERVER SETTINGS START"), add the following syntax to configure the FME Engines to accept or reject jobs with certain tags:
TM_ENGINE_<ConfigNumber>=<EngineHostName>:<EngineInstanceName>:<TagName>
Note: <ConfigNumber>
should start at 1 and increment sequentially.
Note: <EngineHostName>
and <EngineInstanceName>
are case-insensitive. <TagName>
is case-sensitive.
Note: If a high availability environment is configured with multiple FME Engine hosts having the same FME Engine name, the job routing server configuration applies to all FME Engines with the same name in the same way regardless of which host it resides on.
In this example, any job with the tag"fast" would be processed (accepted) by engine1 or engine2 (on host "panaka"), while engine3 would process jobs with the "utility" tag. Any jobs with any other tag or no tag will be processed by any other engines that have not been explicitly associated with a tag. (By default, these engines are associated with the TM_DEFAULT_TAG tag.)
TM_ENGINE_1=panaka:engine1:fast
TM_ENGINE_2=panaka:engine2:fast
TM_ENGINE_3=panaka:engine3:utility
The next step is to submit a job with a tag. You can submit a job with a tag using the web services and HTTP or directly using the FME Server Console.
Open the Web UI, navigate to the service you want, and get the Show Request value, such as:
http://<host>/fmejobsubmitter/Samples/austinDownload.fmw
Append tm_tag= and the tag to the end of the URL, for example:
http://localhost/fmejobsubmitter/Samples/austinDownload.fmw?tm_tag=fast
The FME Server core uses the tag to determine whether FME Engines can accept the request.
Append the following text to the submit_job or run_workspace command:
tm_outputFormatTag fast
For example:
run_workspace Samples/austinDownload.fmw tm_tag fast
You can direct the FME Server Core to assign all jobs submitted from a repository to whatever engine is specified in the TM_ENGINE_<
ConfigNumber
>
parameter, regardless of the tag that is associated with a client-side job request. To do so, use the following syntax in the fmeServerConfig.txt configuration file:
TM_REPOSITORY_<ConfigNumber>=<
RepositoryName>:<TagName>
In this example, any jobs from the "Samples" repository are assigned the "fast" tag. This tag will override any tag assigned to a job in the "Samples" repository by the client-side job request.
TM_REPOSITORY_1=Samples:fast