In this paper, we investigate an infinite-buffer queue with batch-arrival and batch-service wherein a single server operates under random serving capacity rule with service time dependent on the size of the batch under the service. First, we derive the probability generating function of state probabilities at service completion epoch, from which an entire spectrum regarding queue-length at various epochs is extracted. Using the departure epoch probabilities, we establish a stable relationship between departure and random epochs probabilities based on ‘rate in = rate out’ approach. Further, random epoch probabilities are used to obtain pre-arrival epoch probabilities. Finally, we illustrate our analytical results by means of numerical computation which includes the case of multiple roots.