Extract out pagination into a constant.
Track pages rather than message offsets.