-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
The configuration of the broker is almost completely done in the database, as with all Optimal Framework peers it stores its configuration in its node.
However, there are some settings that affect the startup of the system, and are therefore in a config file in the Optimal Framework application folder.
There are some things that the broker needs to know:
- Its peer address; This is to separate it from other peers and get the database stored settings.
- Information on the MongoDB backend; In the "database" section, the name of the database, credentials and so forth are stored.
- Logging; What should be logged (default is "information") and to where. If, for example, the broker won't start, one may want to enable the debug-level. This setting could be stored in the database, but if the broker doesn't start properly, there might not be a connection to the database, so that setting might be both unavailable and perhaps impractical to set without a UI. However, it might be so that the file setting, if set takes precedence.
This is how the default file looks.
{
"broker": {
"address": "broker01",
"pluginFolder": "~/optimalframework/plugins",
"database": {
"databaseName": "test_of"
},
"logging": {
"severityLevel": "debug",
"databaseLevel": "information"
}
}
}
Actually, the broker could have defaults for all these settings, except for the peer address. Because the most basic use case is:
- that OF just runs against a local MongoDB instance without any authentication
- the plugin folder is a folder called "plugins" in the application home folder, which in turn is at "~/optimalframework".
The peer address, or peer name of the broker, an example would be "broker01", as above.
A path to the folder of the plugins, if not ~/optimalframework/plugins
The database section hold settings that pertains to the database backend, server name, and credentials.
The name of the MongoDB backend database
The logging section sets the logging levels.
Events with a lower severity than this setting, will not be reported.
Events with a lower severity than this setting, will not be reported to the database. The reason for this setting is that sometimes one just want to debug on the client while not filling the database event log with debugging information.
Plugins of OF may well want to extend this and use their own settings, for this the "init_broker_scope"-hook is provided. See the Optimal BPM plug-in for an example.