Inspirel banner

Programming Distributed Systems with YAMI4

7.2.7 Startup and Configuration

The YAMI4 message broker is a separate, natively compiled program, that can be run from its directory with a simple invocation:

$ ./yami4broker

The server accepts optionally a name of configuration file as a parameter, but if none is given then the yami4broker.cfg file is used by default.

The configuration file is a text file and defines the following properties:

The message broker reports its activity on standard output, according to logging flags defined in the configuration file.

In addition to the configuration options described above, the broker can have an arbitrary number of forwarding channels, which to a large extent behave like permanent subscriptions with the exception that update messages sent to the forward targets have the form of regular publish messages to facilitate broker chaining.

An example forwarding can be defined as:

In this case all messages that are delivered to this broker by means of publish commands (all, because a single wildcard tag matches everything) will be forwarded to another broker running on the same host and port 12346. Any number of forwarding channels can be set up this way with indexes that form continuous range.

One of the possible uses for forwarding channels is to set up a cascading cluster for sharing load across many brokers.

Forwarding channels ignore transmission errors and are permanently active in the broker, but they are not optimized for long-term failures. It is therefore important to accompany them with the higher-level startup routine that will ensure that all involved brokers are properly running with the possible exception of some short initial period when some brokers are not yet ready while others are already operational.


It should be noted that forward channels can form an unintended circle. There is no protection against this, so some administrative care should be taken to avoid it.