A single-server queue with inventory is considered. For service of a customer, a definite number of inventory units is required. Depending on availability of inventory units, two types of customer's service are possible. Arriving customers may decide to balk or join the buffer depending on the queue length. Customers from the buffer may leave the system without service after a random amount of time of staying there. Replenishment of the storage for inventory units is implemented after a random amount of time. Practical example of the considered model is briefly discussed. Behavior of the system is described by the multi-dimensional continuous-time Markov chain. The generator of this chain is presented and the problem of computation of the stationary distribution is considered. Some performance measures of the system are calculated. Numerical experiments show the necessity of careful account of possible bursty arrival of customers.