Make pausedLatch in KafkaInput volatile to avoid visibility problems.