# Spring-Boot-RestAPI-Kafka-Cassandra
This Spring Boot Application is integrated to the Kafka and Cassandra.
a ) You can insert the data into the Cassandra by passing the json data to the API through post request.
b) You can filter/fetch/delete the data from Cassandra DB using Get/PUT/DELETE Requests.
c) You can pass the Json Messages to the API from Kafka Consumer. It process those messages and insert into the Cassandra DB.
Spring Boot Version: 1.4.2
JDK Version: 1.8
Cassandra/Datastax : 2.2.8
Kafka Version: latest version
Download the datastax instance(dsc-cassandra-2.2.8-bin.tar.gz) from the below repo.
https://downloads.datastax.com/community/
Download and install the Kafka from the below site
https://kafka.apache.org/quickstart
Prerequisites to start the application.
1. Install Datastax
2. Start the cassandra instance
3. Start the cql instance and create the keyspace applepi.
4. Start the Zookeper Server.
5. Start the Kafka Server.
6. Start the Kafka Producer.
7. Create a topic with the name applepi
Instructions to start the spring boot app.
1. Download the code fromt git repo.
2. Build the code using the below command
./gradlew clean build
3. Run the code using the below command.
Go to the build/libs folder
Run the jar using as below.
java -jar SpringBoot_RestAPI-0.0.1-SNAPSHOT.jar
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
这个Spring Boot应用程序集成了Kafka和Cassandra。 a) 您可以通过post请求将json数据传递给API,将数据插入Cassandra。它处理这些消息并插入到Cassandra DB中。 Spring Boot版本:1.4.2 JDK版本:1.8 Cassandra/Datastax:2.2.8 Kafka版本:最新版本 从下面的 repo 下载 datastax 实例(dsc-cassandra-2.2.8-bin.tar.gz)。https://downloads.datastax.com/community/ 从下面的网站下载并安装Kafka https://kafka.apache.org/quickstart 启动应用程序的先决条件。 安装Datastax 启动cassandra实例 启动cql实例并创建密钥空间applepi。 启动Zookeper服务器。 启动Kafka服务器。 启动Kafka Producer。 创建一个名称为applepi的主题 启动spring boot应用程序的说明。 从git repo下载代码。
资源推荐
资源详情
资源评论
收起资源包目录
SpringBoot-Kafka-Cassandra-master.zip (24个子文件)
SpringBoot-Kafka-Cassandra-master
gradle
wrapper
gradle-wrapper.jar 52KB
gradle-wrapper.properties 230B
src
test
java
com
tgt
SpringKafkaApplicationTests.java 1017B
SpringBootRestApiApplicationTests.java 341B
main
resources
application.properties 80B
server.properties 5KB
java
com
tgt
producer
KafkaProducerConfig.java 2KB
KafkaProducer.java 2KB
controller
EmployeeController.java 1KB
dao
EmployeeDAOImpl.java 1KB
EmployeeDAO.java 919B
consumer
KafkaConsumerConfig.java 2KB
KafkaConsumer.java 1KB
service
EmployeeService.java 914B
EmployeeServiceImpl.java 1KB
entity
Employee.java 2KB
util
CassandraUtil.java 3KB
MyCassandraTemplate.java 4KB
ProcessMessage.java 2KB
SpringBootRestApiApplication.java 423B
gradlew.bat 2KB
build.gradle 1KB
gradlew 5KB
README.md 1KB
共 24 条
- 1
资源评论
ReganYue
- 粉丝: 3290
- 资源: 92
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功