You are here: Administrator's Guide > Other Common Tasks > Sending Jobs to Specific Engines with Job Routing

Sending Jobs to Specific Engines with Job Routing

Job Routing is a mechanism for sending specific jobs to specific FME Engines. The reasons for doing this include:

  • Sending jobs to an FME Engine in close proximity to a data source.
  • Sending jobs to an FME Engine that supports a particular format
  • Reserving an FME Engine for a scheduled task.
  • Reserving an FME Engine for quick jobs.

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. You can see the names of your FME Engines on the Engines & Licensing page of the Web User Interface, under 'Licensed Engines'.

Assigning Jobs to a Subset of Available FME Engines

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

  1. Open the <FMEServerDir>\Server\fmeServerConfig.txt configuration file.
  2. Under "Job Routing" (near the 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>=<EngineInstanceName>:<TagName> [...n]

    Note: <ConfigNumber> should start at 1 and increment sequentially.

    <EngineInstanceName> is case-insensitive. <TagName> is case-sensitive.

    Separate multiple <TagName>s with a space.

  4. Restart FME Server.

Note: If a fault-tolerance 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 tags "fast" or "normal" are processed (accepted) by engine1 or engine2, while engine3 processes jobs with the "utility" tag. Any jobs with any other tag or no tag are processed by any other engines that have not been assigned a tag or have been assigned the "default" tag. (By default, these engines are associated with the tag assigned to TM_DEFAULT_TAG.)

TM_DEFAULT_TAG=default

TM_ENGINE_1=engine1:fast normal default

TM_ENGINE_2=engine2:fast normal default
TM_ENGINE_3=engine3:utility default

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

From the Web User Interface, open a workspace to run, following the instructions in Configuring and Running Workspaces. On the Run a Workspace page, click the Show Developer Information button , and get the Direct Url Example value, such as:

http://localhost/fmedatadownload/Samples/austinDownload.fmw?

Copy the URL into your browser's address bar and append tm_tag= and the tag to the end of the URL, for example:

http://localhost/fmedatadownload/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_tag 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>

Note: <ConfigNumber> should start at 1 and increment sequentially.

<RepositoryName> and <TagName> are case-sensitive.

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