The C++ broker automatically loads available plugins when it starts. It can get plugins from two places:

  1. All loadable plugins from the directory specified with the --module-dir option. This option has a platform-specific default which is used unless the --no-module-dir is specified.
  2. Individual plugins specified with the --load-module option

The broker will try to dynamically load shareable modules from the above locations. What actually registers the plugin with the Broker, though, is an action performed by the loaded module. Most (if not all) of the current plugins use a static instance of a class derived from qpid::Plugin. The object construction ends up calling the Plugin constructor which records the presence of the plugin.

There is no way to explicitly unload a plugin during execution. The scheme relies on process run-down unloading the dynamically loaded modules. However, there is a finalization procedure executed before the process runs down.

The C++ broker follows these basic steps at start time: