Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active July 28, 2022 04:09
Show Gist options
  • Save garystafford/af35acb31fe495cee58d9c5d3b4e0d6c to your computer and use it in GitHub Desktop.
Save garystafford/af35acb31fe495cee58d9c5d3b4e0d6c to your computer and use it in GitHub Desktop.
bin/kafka-console-producer.sh \
--topic topicA \
--bootstrap-server $BOOTSTRAP_SERVER \
--producer.config config/client.properties
# copy and paste contents of 'sales_messages.txt' and then Ctrl+C to exit
# check for messages in topic
bin/kafka-console-consumer.sh \
--topic topicA \
--from-beginning --max-messages 5 \
--property print.value=true \
--property print.offset=true \
--property print.partition=true \
--property print.timestamp=true \
--bootstrap-server $BOOTSTRAP_SERVER \
--consumer.config config/client.properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment