This blog post shows how to configure Spring Kafka and Spring Boot to send messages using JSON and receive them in multiple formats: JSON, plain Strings or byte arrays. Based on this configuration, you could also switch your Kafka producer from sending JSON to other serialization methods.
This sample application also demonstrates the usage of three Kafka consumers within the same consumer group, so the messages are load-balanced between the three. Each consumer implements a different deserialization approach.
Besides, at the end of this post, you will find some practical exercises in case you want to grasp some Kafka concepts like the Consumer Group and Topic partitions.