How to use Apache kafka with Spring mvc? Is it possible?

I start with apache kafka and try to learn the confluent - kafka - rest - utils, but I'm confused how I can use it.

During the search, I found this documentation https://spring.io/blog/2015/04/15/using-apache-kafka-for-integration-and-data-processing-pipelines-with-spring

This is very good documentation, but it does not help me learn to relax.

Git code for confluent kafka rest utils

https://github.com/confluentinc/kafka-rest demonstrates how to use kafka relaxation. But I want to know the exact procedure in order to learn more about it. with some simple explanation. Can someone suggest me some links on how I use the client for relaxation. Please guide me to this.

This may be a stupid question, but I have no other way to find out.

early.

+7
spring-integration apache-kafka confluence-rest-api
source share
1 answer

First, try creating a REST service using spring MVC while keeping kafa aside.

Once you can start the hello world REST service, then select "Kafka Docs". A.

Refer to the docs on how to create a kafka cluster, and run the default client and client software products to test your cluster.

Now write the main java program and create the kafka manufacturer using the Kafka client API . Refer to your documents. Make sure that messages sent through the main program reach the consumer.

Now add the contents of this main program to the recreation service so that messages sent to the request body are now transmitted to the kafka cluster and read by the consumer.

Hope this helps.

+2
source share

All Articles