Commit 38309ff6 authored by Shanelle Valencia's avatar Shanelle Valencia

Update README.md

parent 9cfefa7f
Pipeline #1680 failed with stage
...@@ -58,3 +58,19 @@ Example Console Response: ...@@ -58,3 +58,19 @@ Example Console Response:
2021-05-05 17:13:29.932 INFO 82715 --- [ntainer#0-0-C-1] c.afp.ordermanagement.service.Consumer : #### -> Consumed message -> somethinghere 2021-05-05 17:13:29.932 INFO 82715 --- [ntainer#0-0-C-1] c.afp.ordermanagement.service.Consumer : #### -> Consumed message -> somethinghere
``` ```
## Testing Kafka Producer and Consumer
Make sure Kafka server and zookeeper are running
To create a kafka topic:
kafka-topics.sh --describe --topic <insert-topic-here> --bootstrap-server localhost:9092
if the first command doesn't work, try running below command:
/usr/local/Cellar/kafka/2.8.0/bin/kafka-topics --describe --topic orders --bootstrap-server localhost:9092
To open a producer console:
kafka-console-producer.sh --topic orders --bootstrap-server localhost:9092
-OR-
/usr/local/Cellar/kafka/2.8.0/bin/kafka-console-producer --topic orders --bootstrap-server localhost:9092
To open a consumer console:
kafka-console-consumer.sh --topic orders --from-beginning --bootstrap-server localhost:9092
-OR-
/usr/local/Cellar/kafka/2.8.0/bin/kafka-console-consumer --topic orders --from-beginning --bootstrap-server localhost:9092
if pathway is still not found, try "ls -alrth /usr/local/Cellar/kafka" until you get to the bin directory which has all the kafka commands
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment