Skip to main content
Skip table of contents

Connecting multiple Standalone SwiftMQ Routers

Connecting SwiftMQ Routers build a Pub/Sub Network

If you run Flow Director in embedded mode, it starts an embedded SwiftMQ router called flowdirector.

By connecting other SwiftMQ routers to router flowdirector, they automatically build a router network with the consequence that all publish/subscribe topics are connected. Producers and consumers can exchange messages on all topics of all routers.

However, if your routers are intended to run standalone but you want to manage them with the SwiftMQ Explorer App from a single Flow Director instance, connecting topics is not what you want.

The following solution describes a way to connect standalone routers that remain isolated.

Unique Router Names required

For this solution to work, it is required that all routers connected to the embedded flowdirector router have unique names. Otherwise, the routing connection will be rejected.

Add Route Filters

Add route filters at router flowdirector for all standalone routers that connect to it:

For example, we want to connect standalone routers node1, node2, and node3_test. We also want to connect another network of routers that contain the router master with connected routers slave1 and slave2 (the slaves are connected to the master).

  • For all standalone routers add a route filter include_by_destination with the name set to the router name, i.e., node1.

  • For all router networks add a route filter include_by_hop with the name set to the directly connected router name of that network. In the above example, this is master.

If the routing connections to flowdirector are already established, disconnect them for the filters to take effect. To remove routing queues that might have been created, it is recommended to reboot the respective routers.

The route filters will only allow routes between the routers and router flowdirector but not between the connected routers. You can verify it, i.e., by checking the routing table of slave2 which still can exchange messages with its local network and flowdirector but not with, i.e., node1:

Managing Users and Views

To ensure that users can only see and manage their own standalone routers/networks, you need to create views in SwiftMQ Explorer App.

Login as admin and click on the menu App Configuration / Authentication. On the left tab click on Views. Then for each standalone router/network create a new view.

For example, the view for node1 looks like this:

While the view for the master-slave1-slave2 network looks like this:

You can create multiple views per router/network if you have users with different rights on it. But at a minimum you should have one for each router/network:

In the Users tab create at least one user with a corresponding view. The menu should be user to avoid that they can manage the SwiftMQ Explorer App:

Log in as node1user:

Log in as masterandslavesuser:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.