Requirements

Flow Director requires GraalVM CE (free Community Edition) which is a polyglot JVM based on OpenJDK and provided from Oracle. All SwiftMQ router that are connected to Flow Director also require to run on GraalVM.

Install GraalVM.

Modes of Operation

You can operate Flow Director in two modes:

Embedded

In this mode, Flow Director launches an embedded SwiftMQ CE router called flowdirector to deploy and execute flows.

Flight

Here, Flow Director does NOT launch an embedded router but connects to an existing SwiftMQ router that can also be a SwiftMQ HA router.

Run Flow Director in Embedded Mode (local)

After unpacking the distribution, change to the scripts directory (open a terminal there) and execute:

./startserver
BASH

Run Flow Director in Flight Mode (local)

After unpacking the distribution, change to the scripts directory (open a terminal there) and execute:

./startflight [<hostname> <port> <JMS username> <JMS password> <TLS true/false> <keepalive secs> [<hostname2> <port2>]]
BASH

Parameter

Meaning

Default

hostname

Hostname of the SwiftMQ router.

localhost

port

JMS port of the SwiftMQ router.

4001

JMS username

Name of the JMS user.

admin

JMS password

Password of the JMS user.

secret

TLS true/false

Use a secure TLS connection.

false

keepalive secs

SMQP keepalive interval of the JMS listener.

60

hostname2

Hostname of the 2nd HA instance.

port2

JMS port of the 2nd HA instance.

If you don’t pass any parameter to the script, it will use the above-mentioned default values.

Run Flow Director in Embedded Mode (Docker)

Create a new directory flowdirector and open a terminal there. Flow Director will create 2 sub-directories to store data. Then run these commands.

Unix/Linux/macOS:

docker run -d --name flowdirector \
-p 8080:8080 \
-p 4100:44001 \
-p 5672:45672 \
-p 1883:41883 \
-v `pwd`/data/apps:/flowdirector/apps \
-v `pwd`/data/log:/flowdirector/log \
-v `pwd`/data/config:/flowdirector/config \
-v `pwd`/router/data:/flowdirector/router/data \
flowdirector/fdserver:latest
BASH

Windows:

docker run -d --name flowdirector \
-p 8080:8080 \
-p 4100:44001 \
-p 5672:45672 \
-p 1883:41883 \
-v "%cd%/data/apps":/flowdirector/apps \
-v "%cd%/data/log":/flowdirector/log \
-v "%cd%/data/config":/flowdirector/config \
-v "%cd%/router/data":/flowdirector/router/data \
flowdirector/fdserver:latest
BASH

It creates Flow Director in Embedded mode, listening on port 8080 for HTTP, 4001 on JMS, 5672 on AMQP, 1883 on MQTT, and 4100 on Routing connections.

Run Flow Director in Flight Mode (Docker)

Create a new directory flowdirector and open a terminal there. Flow Director will create a data sub-directories to store data. Then run these commands.

Unix/Linux/macOS:

docker run -d --name flowdirector \
-p 8080:8080 \
-e FD_LIGHT=true \
-e FD_LIGHT_HOSTNAME=<hostname> \
-e FD_LIGHT_PORT=<port> \
-e FD_JMS_USERNAME=<JMS username> \
-e FD_JMS_PASSWORD=<JMS password> \
-e FD_LIGHT_TLS=<TLS true/false> \
-e FD_LIGHT_KEEPALIVE=<keepalive secs> \
-e FD_LIGHT_HOSTNAME2=<hostname2> \
-e FD_LIGHT_PORT2=<port2> \
-v `pwd`/data/apps:/flowdirector/apps \
-v `pwd`/data/log:/flowdirector/log \
-v `pwd`/data/config:/flowdirector/config \
flowdirector/fdserver:latest
BASH

Windows:

docker run -d --name flowdirector \
-p 8080:8080 \
-e FD_LIGHT=true \
-e FD_LIGHT_HOSTNAME=<hostname> \
-e FD_LIGHT_PORT=<port> \
-e FD_JMS_USERNAME=<JMS username> \
-e FD_JMS_PASSWORD=<JMS password> \
-e FD_LIGHT_TLS=<TLS true/false> \
-e FD_LIGHT_KEEPALIVE=<keepalive secs> \
-e FD_LIGHT_HOSTNAME2=<hostname2> \
-e FD_LIGHT_PORT2=<port2> \
-v "%cd%/data/apps":/flowdirector/apps \
-v "%cd%/data/log":/flowdirector/log \
-v "%cd%/data/config":/flowdirector/config \
flowdirector/fdserver:latest
BASH

You need to fill the respective values of the environment variables (-e) accordingly. You can omit FD_LIGHT_HOSTNAME2 and FD_LIGHT_PORT2 if you don't use a SwiftMQ HA router.

Keep in mind: If the SwiftMQ router you want to connect to runs on the same host, neither use localhost nor 127.0.0.1 as hostname as it would point to the internal localhost of the Docker container.

It creates Flow Director in Flight mode, listening on port 8080 for HTTP. All other listeners are provided from the external SwiftMQ router.