producer: small refactor after parent commit
producer: small refactor after parent commit

Signed-off-by: Yung-Chin Oei <e4c1ab9da74060df152545062ee274845648ed6c@yungchin.nl>
(cherry picked from commit aff59c399fe875e292051865a8a67a0c7f5a1299)
Signed-off-by: Yung-Chin Oei <e4c1ab9da74060df152545062ee274845648ed6c@yungchin.nl>

wikimedia/operations-debs-python-pykafka,benauthor/pykafka,thedrow/samsa,thedrow/samsa,thedrow/samsa,benauthor/pykafka,wikimedia/operations-debs-python-pykafka,wikimedia/operations-debs-python-pykafka,benauthor/pykafka