Executing simple kafka producer program in java

Linked page has a typo in the serializers

Remove the hyphens from serializa-tion since they are not allowed in Java class names

Or use StringSerializer.class directly as the value rather than a string.


I still recommend that you use an IDE along with Maven/Gradle rather than editing and compiling via a terminal