The below code is almost 1 to 1 replica of the example from Confluent.Kafka github repo. This is not production code. It is used in unit tests, to validate that messages are