Flux Agents

Agents are light-weight Flux components that can be used to run native batch files or processes specified in Process Actions in a workflow on remote machines.

Agents are an add-on component to Flux that allow you to divide your workload to achieve scalability across a network of machines, and invoke remote tasks that are not local to the Flux engine.

Agents require at least one Flux engine to coordinate that will be delivered to the agents. Because the Flux Engine itself is capable of running any task that may run on an agent, agents are primarily useful for running tasks on a machine that is remote from the Flux engine across the network.

For example, say you have a machine that runs batch processes and these processes use a lot of CPU cycles and memory. With increasing number of processes, you will rapidly run into heavy resource usage on your machine and reach scalability limits. This problem can be easily resolved by running Flux Agents in your network. Flux Agents running on different machines in your network will register with a central Flux engine or a Flux cluster. Once the Flux Agents are started and registered, you can export flow charts to the Flux Engine cluster. This cluster of Flux engines will distribute the processes in the flow charts over the network of Agents, assigning each "Free Agent" a process to run. 

Flux Engine-Agent relationship

A single Flux engine or Flux engines in a Flux cluster act as coordinators in the agent architecture, exporting processes to registered Flux agents. Flux engines should be run on machines in a network with connectivity to agent machines. The diagram below shows the basic layout for engine – agent relationships. 



List of Configuration Properties

The following table contains a list of configuration properties that can be set in your agent configuration, along with a description of each, and the default value (if any) that is used if you do not set the configuration property yourself.


Default Value


The number of processes that can execute simultaneously on this agent. 



The encrypted password that the Agent uses to log in to a remote Flux engine. Encrypted passwords can be generated using the Engine's command line interface. This property can only be used if ENGINE_PASSWORD is null or empty. 

none (this property is not set by default) 


The host name of the Flux engine with which an agent intends to register. When an agent registers with an engine, the agent effectively registers with all engines in that cluster. This property must be set to allow the agent to look up the engine. 

none (this property is not set by default and must be explicitly configured) 


The password this agent uses to login to a remote Flux engine. This property can only be set if ENGINE_ENCRYPTED_PASSWORD is null or empty. 

none (this property is not set by default) 


The name the remote Flux engine is bound to in the RMI registry. The agent will use this name to look up the remote engine. 



The port of the RMI registry that the remote Flux engine is bound to. The agent will use this port to look up the remote engine. 



The username that this agent will use to log in to the remote Flux engine. 

none (this property is not set by default) 


A description of the agent instance intended for human consumption. 



A long, descriptive name of the agent instance, intended for display purposes. 



The case-insensitive name of the agent instance. Used to differentiate agent instances in the logs, the audit trail, and Flux security login modules. If the name is not set explicitly in a configuration, the configuration will generate a name using:

  1. The host name of the local computer but not "localhost". For example, "foo" or "".

  2. Failing that, the IP address of the local computer but not "". For example, "".

  3. Failing that, "unknown".
    If there is more than one active agent in a JVM, each generated name is made unique. To make a generated name unique, a ":" symbol is first appended to the name that is generated as described above. A number, starting from one, is then appended to ensure that the generated name is unique within the JVM. 

determined on agent startup (see description column) 


The (case-insensitive) name of this pool that the agent will belong. Agent pools allow you to dictate where Process Actions send their work to be executed – a Process Action may run its work on any available agent, or it can use a pool to specify a specific agent or group of agents to execute the work. If an agent's POOL configuration setting matches the value that a Process Action uses, that agent will be eligible to run the work for the Process Action.

This property can be set to any value except '*' is a special character used in Process Actions to indicate that the work can be run on any available agent, regardless of the pool. 

none (agents do not belong to any pool by default) 


The port number where the RMI registry that the agent should use is running. If there is no registry running at the specified port (and no other application is using that port) then the agent will open that port and create a new registry. If there is a registry already running on the port number, the agent will bind to that registry.

This is the port number that the agent uses for all incoming communication to the engine. Any engine connecting to the agent will connect to the engine using this port. 



The TCP/IP port this agent should use when creating RMI objects. A value of 0 indicates that an anonymous port should be used. Java's RMI subsystem multiplexes many RMI objects onto one port, so only a single port need be configured (meaning you can set the RMI_PORT to the same port number as the REGISTRY_PORT with no conflict).

This is the port number that the agent uses for all outgoing communication to the engine. 

0 (anonymous port) 

Agent Sample Configuration

As with engine configurations, agent configurations use the standard Java properties file format <Property name>=<value>. A sample agent configuration file might look like: 


Agent Configuration

Creating a Flux Agent


Agents can be created and started from the Command Line Interface, like so: 

Creating a Flux Agent from the command line
java flux.Main agent-server -configurationfile path/to/ start

Where path/to/ is the path to an agent configuration file. The configuration properties supplied in the configuration will determine how the agent is created and how it connects to the Flux engine.

You can also specify configuration settings directly on the command line. When specifying a configuration setting, the name of the property should be applied in lowercase, with all '_' characters removed, followed by a space, then the value of the configuration property. For example: 

Start a Flux Agent from the command line with specific options
java flux.Main agent-server -registryport 1100 -enginehost localhost -engineusername admin -enginepassword admin start

The script start-agent, located in the Flux installation directory, is a sample script included for your convenience to demonstrate how to create and start the agent from the command line. 

States of a Flux Agent


Agent State Diagram below outlines the states of a Flux agent. 

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.