使用 spring apache kafka 将数据从 kafka 主题加载到 Cassandra
Loading Data to Cassandra from kafka topic using spring apache kafka
我正在尝试开发一个 spring 应用程序,该应用程序将从用户那里获取输入并将其存储到主题,然后我不想将其从该主题加载到 cassandra(注意:- 不使用 confluent卡夫卡版本)。所以,到目前为止,我能够在 spring 中编写生产者和消费者逻辑,现在需要将数据从 kafka 主题加载到 cassandra。
我怎样才能做到这一点???当我浏览互联网时,建议使用 confluent kafka 提供的 API 。但是,我想在 Spring 完成。我不确定如何编码,也不确定我是否可以使用 apache kafka 的非融合风格来实现这一点。
提前致谢
Spring 数据有一个 Cassandra 模块:
https://spring.io/projects/spring-data-cassandra
The Apache Cassandra NoSQL Database offers many new capabilities for teams seeking a solution to handle high velocity, high volume and variable data flows. This new way of thinking introduces new concepts and a learning curve that can be intimidating to team members and team managers. Spring Data for Apache Cassandra offers a familiar interface to those who have used other Spring Data modules in the past.
The learning curve for developing applications with Apache Cassandra is significantly reduced when using Spring Data for Apache Cassandra. With the power to stay at a high level with annotated POJOs, or at a low level with high performance data ingestion capabilities, the Spring Data for Apache Cassandra templates are sure to meet every application need.
特点
基于通用 Spring 数据接口
构建存储库
支持同步、反应和异步数据操作
支持基于 XML 的键空间创建和 CQL Table 创建
Java配置和XML支持所有集群和会话功能
异常转换为熟悉的 Spring DataAccessException 层次结构
方便的 QueryBuilders 无需学习 CQL
存储库接口的自动实现,包括对自定义查询方法的支持
2.x版本基于3.xDataStax CQLJava驱动,3.x版本使用DataStaxJava驱动4.x
如果数据已经发布在 Kafka 主题上,您可以只使用 DataStax Kafka connector for Apache Cassandra, DataStax Enterprise and Astra DB。
该连接器可让您将 Kafka 主题中的记录保存到 Cassandra 表中。它是开源的,因此可以免费使用。干杯!
我正在尝试开发一个 spring 应用程序,该应用程序将从用户那里获取输入并将其存储到主题,然后我不想将其从该主题加载到 cassandra(注意:- 不使用 confluent卡夫卡版本)。所以,到目前为止,我能够在 spring 中编写生产者和消费者逻辑,现在需要将数据从 kafka 主题加载到 cassandra。 我怎样才能做到这一点???当我浏览互联网时,建议使用 confluent kafka 提供的 API 。但是,我想在 Spring 完成。我不确定如何编码,也不确定我是否可以使用 apache kafka 的非融合风格来实现这一点。
提前致谢
Spring 数据有一个 Cassandra 模块:
https://spring.io/projects/spring-data-cassandra
The Apache Cassandra NoSQL Database offers many new capabilities for teams seeking a solution to handle high velocity, high volume and variable data flows. This new way of thinking introduces new concepts and a learning curve that can be intimidating to team members and team managers. Spring Data for Apache Cassandra offers a familiar interface to those who have used other Spring Data modules in the past.
The learning curve for developing applications with Apache Cassandra is significantly reduced when using Spring Data for Apache Cassandra. With the power to stay at a high level with annotated POJOs, or at a low level with high performance data ingestion capabilities, the Spring Data for Apache Cassandra templates are sure to meet every application need.
特点 基于通用 Spring 数据接口
构建存储库支持同步、反应和异步数据操作
支持基于 XML 的键空间创建和 CQL Table 创建
Java配置和XML支持所有集群和会话功能
异常转换为熟悉的 Spring DataAccessException 层次结构
方便的 QueryBuilders 无需学习 CQL
存储库接口的自动实现,包括对自定义查询方法的支持
2.x版本基于3.xDataStax CQLJava驱动,3.x版本使用DataStaxJava驱动4.x
如果数据已经发布在 Kafka 主题上,您可以只使用 DataStax Kafka connector for Apache Cassandra, DataStax Enterprise and Astra DB。
该连接器可让您将 Kafka 主题中的记录保存到 Cassandra 表中。它是开源的,因此可以免费使用。干杯!