Add debug flag and expose queue limits for configuration.