Decide which queue factory using at runtime

The value of "debug" can be defined after the service provider is
registered. This shouldn't have any impact on its behavior.