createFromConfig

fun createFromConfig(config: ServerConfig, logger: Logger? = null): Result<Broker>

Creates a broker from a given configuration.

Attempts to use the config "type" filed to determine the correct broker factory to forward the request to.

Return

a result containing the broker or an error

Parameters

config

the server configuration

logger

the logger to use for the broker