Support arbitrary gateways

Source all queue configuration from the config.

Relevant to @technicalpickles' interests.