Is there any way I can view the message content sent to kafka for a given topic? Say some thing like view last 5 messages for this topic, if that it possible.
Use the Kafka consumer provided by Kafka :
bin/kafka-console-consumer.sh --bootstrap-server BROKERS --topic TOPIC_NAME
It will display the messages as it will receive it. Add --from-beginning if you want to start from the beginning.
--from-beginning