1.3 KiB
1.3 KiB
[Amigoscode, Nelson] Microservices and Distributed Systems [ENG, 2022] Kafka Part
IntellJ Idea (Ultimate)
// Receive a Message
$ kafka-console-consumer.sh \
--bootstrap-server localhost:9092 \
--topic amigoscode \
--from-beginning
^C
// POST
$ curl \
--data '{
"message":"Hooray Amigoscode"
}' \
--header "Content-Type: application/json" \
--request POST \
--url http://localhost:8080/api/v1/messages \
| jq
UPD! Should be fixed!
Looks with Data Format on Reading from Kafka
$ kafka-console-consumer.sh \
> --bootstrap-server localhost:9092 \
> --topic amigoscode \
> --from-beginning
{"message":"Hooray Amigoscode","created":[2022,4,9,21,20,9,460259917]}
{"message":"Hooray Amigoscode","created":[2022,4,9,21,22,22,43521562]}
{"message":"Hooray Amigoscode","created":[2022,4,9,21,22,33,600139003]}
{"message":"Hooray Amigoscode","created":[2022,4,9,21,22,41,357558500]}
Marley
Any questions in english: Telegram Chat
Любые вопросы на русском: Телеграм чат