0

I'm new to Apache Kafka and Kafkacat trying to learn new things from here: https://www.youtube.com/watch?v=5Mgni6AYnWg&t=123s at time 17:32.

I setup a kafka and kafkacat on my remote VM.

[user@user bin]$ ./kafka-topics.sh --list --zookeeper localhost:2181
__consumer_offsets
quickstart-events
test
toUpperCase-in-0
toUpperCase-out-0
users-log

when I am typing some data over kafkacat then nothing is getting printed on another side.

[user@user bin]$ kafkacat -b localhost:9092 -t toUpperCase-in-0 -P
Hello
Hey
Hie
Howdy
John
Sam

Another termonal

[user@user ~]kafkacat -b localhost:9092 -t toUpperCase-out-0                   
% Auto-selecting Consumer mode (use -P or -C to override)
% Reached end of topic toUpperCase-out-0 [0] at offset 0

What could be the issue?

[user@userbin]$ ./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic toUpperCase-in-0 --from-beginning
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
PAA
  • 1
  • 46
  • 174
  • 282

1 Answers1

0

As it looks like you writing to one topic named toUpperCase-in-0 and reading from another one toUpperCase-out-0

There is nothing moving the data from the toUpperCase-in-0 topic into the toUpperCase-out-0.

kafka doesn't move the data for you, when you insert into one topic you need something to read it and move it (like another process that do it), it's not like a pipe, it a log file

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Reznik
  • 2,663
  • 1
  • 11
  • 31
  • If you see carefully they have developed a Spring Boot Apache Kafka App - where they creates two topics, one topic will send data and other topic will read data by making all messages to uppercase. – PAA Mar 16 '21 at 05:06
  • @Pra Your question shows no Spring app actually running – OneCricketeer Mar 16 '21 at 14:14
  • @Pra_A Maybe you didnt run the spring boot? or it configure wrong? – Reznik Mar 16 '21 at 17:37