Skip to content
Snippets Groups Projects
Commit f33b725e authored by Martin Schmollinger's avatar Martin Schmollinger
Browse files

Updated README.md for simplified version

parent 1cc6bdd3
No related branches found
No related tags found
No related merge requests found
# Just start hello-kafka using docker compose
# Just start kafka container using docker compose
> docker compose up --build
The hello-kafka container will exit after submiting and receiving a message to kafka. The kafka container will go on.
# Stop hello-kafka
# Shutdown of kafka container
> docker compose down
# Run hello-kafka like a normal go program
> go run .
Look at the log file of container hello-kafka.
## Output schould be similar to that:
``202##3-05-11 18:57:27 wait-for-it.sh: waiting 20 seconds for kafka:9092
2023-05-11 18:57:37 wait-for-it.sh: kafka:9092 is available after 10 seconds
2023-05-11 18:57:37 2023/05/11 16:57:37 Topic 'hello-kafka' with 1 partitions successfully created
2023-05-11 18:57:37 time="2023-05-11T16:57:37Z" level=info msg="Send message 'Hello Kafka!' to topic 'hello-kafka'\n"
2023-05-11 18:57:38 time="2023-05-11T16:57:38Z" level=info msg="Successfully send message 'Hello Kafka!' to topic 'hello-kafka'\n"
2023-05-11 18:57:38 time="2023-05-11T16:57:38Z" level=info msg="Start reading message from topic 'hello-kafka'"
2023-05-11 18:57:38 time="2023-05-11T16:57:38Z" level=info msg="Received message from topic 'hello-kafka' at partition 0, offset 0: Hello Kafka!\n"``
\ No newline at end of file
``2024/06/02 13:41:34 Topic 'hello-kafka' with 1 partitions successfully created
INFO[0000] Send message 'Hello Kafka!' to topic 'hello-kafka'
INFO[0001] Successfully send message 'Hello Kafka!' to topic 'hello-kafka'
INFO[0001] Start reading message from topic 'hello-kafka'
INFO[0001] Received message from topic 'hello-kafka' at partition 0, offset 0: Hello Kafka!``
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment