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.
You can use console consumer to view messages produced on some topic:
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning