We study a general single-stage queueing system, in which the input and output processes are modeled as point processes with stochastic intensities. The problem is to control both the input and the output intensities, subject to some state-dependent capacity limits, and the objective is to maximize a discounted value function. With reasonable assumptions on the capacity limits, we show there exists an optimal control that is of threshold type, characterized by a finite upper barrier (the lower barrier being zero). The results developed here provide theoretical justification for the optimality of the threshold control, which is widely applied in practice. © 1990 IEEE