Stella
Stella

Reputation: 1868

Use of Apache Kafka stream builder

I have been trying Apache Kafka open source producer and consumer data streaming. I have a question, what is the difference in using 1.) KafkaProducer, producer.send and 2.) Streamsbuilder, KafkaStreams code? Are they not both for kafka streaming data? If i just use KafkaProducer, producer.send, can't I achieve streaming of data?

Upvotes: 0

Views: 490

Answers (1)

Kiran Balakrishnan
Kiran Balakrishnan

Reputation: 257

You can use Kafka Streams for more complex data processing as it provides a high and low level processor API's.Here in low level processor api you get control over records and create a flow(topology) in which you can manipulate the records in different ways and send it to one or more output topics. In high level you have k-tables that has functionality such as join. These support windowing and other functions that give more control over the data being picked up. State stores are also available in Kafka Streams that help in statefull transformations.Plus its easy to scale horizontally and vertically in Kafka streams

Upvotes: 4

Related Questions