You are here: Common Configurations > Configuring Job Routing

Configuring Job Routing

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.

Determine the FME Engine Names

To redirect a job to a specific FME Engine, you must know the FME Engine's name. To determine the name:

  1. Open the <FMEServerDir>\Server\ processMonitorConfig.txt configuration file.
  2. Scroll down to the bottom of the file to the FME Engine start-up definitions.
  3. Find the FME Engine definition to which you want to assign the job.

Assigning Jobs to a Subset of Available FME Engines

You can configure the FME Server Core to direct jobs with specific tag to specific FME Engines. To do so:

  1. Open the <FMEServerDir>\Server\fmeServerConfig.txt configuration file.
  2. 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:

  3. 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.

  4. Restart FME Server.

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.

Example

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

Submit a Request with a Tag

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.

FME Server Web Services

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.

FME Server Console

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

Configure All Jobs in a Repository with a Tag

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>

Example

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

Safe Software Inc. www.safe.com