add possibility to set max queue size