A set of agents with possibly different waiting costs have to receive the same service one after the other. Efficiency requires to maximize total welfare. Fairness requires to treat equal agents equally. One must form a queue, set up monetary transfers to compensate agents having to wait, and not a priori arbitrarily exclude agents from positions. As one may not know agents' waiting costs, they may have no incentive to reveal them. We identify the only rule satisfying Pareto-efficiency, equal treatment of equals in welfare or symmetry, and strategy-proofness. It satisfies stronger axioms, as no-envy and anonymity. Further, its desirability extends to related problems. To obtain these results, we prove that a rule, single-valued or not, satisfies queue-efficiency and strategy-proofness if and only if it always selects efficient queues and sets transfers à la Groves [Groves, T., 1973. Incentives in teams. Econometrica 41, 617-631]. This holds in other problems, provided the domain of quasi-linear preferences is rich enough.