fix bug with keyed kafka message publishing