In this paper, we deal with an unloader queueing in which N identical trailers are unloaded by a single unloader. We consider two different types of a single unloader, which are subject to breakdowns. In type 1, the unloader can break down only when there is at least one trailer in the system, while in type 2, the unloader can break down even if no trailers are in the system. Analytic closed-form solutions of the unloader queueing system are derived. A cost model is developed in order to determine the optimal value of the number of trailers to be assigned to the unloader for both types. Under the optimal operating condition, numerical results are presented in which several system performance measures are evaluated based on assumed numerical values given to the system parameters. Sensitivity analysis is also investigated.