0

Sorry I'm totally new to "Spring Batch". My requirement is , I need to create Spring Batch 5 project which reads rows from cassandra db (Lest say records of particular status in a table), process it (Resend kafka notification, update status and timestamp) and write it back to cassandra db.

I couldn't find any article that use spring batch with cassandra except this https://github.com/mohdnadeemakhtar/Spring-Batch-with-Cassandra

**I couldn't provide "Datasource" for cassandra db. Is that really possible to acheive my requirement? Do we have any other suggestions than "Spring Batch"? **

I need to create a jar of this app and schedule it as a job that runs for every 15min/30min in server. (For now not much to bather about this section)

I tried to provide cassandra config by extending "AbstactCassandraConfiguration" with Spring batch 3.. version before this, but that too didn't work out well!

1 Answers1

0

That really possible to acheive my requirement?

It is totally possible.

Do we have any other suggestions than "Spring Batch"?

I would isolate third parties integrations (Cassandra / Kafka) from the runtime itself.

For the runtime, Spring Batch would work. You can also consider a Spring camel application. It provides all connectivity and pollers.

Cassandra connectivity

You will rely on Spring Data Cassandra.

You can create extend from AbstractCassandraConfiguration or create your own CqlSession bean providing the informations (ip, port, credentials, keyspace...). Cassandra is not a relational database and using Datasources or JDBC is definitively not the recommended way.

The link you shared is pretty good (except use of JDBC not required). What is the error with AbstractCassandraConfiguration on Cassandra connectivity? Here some explanations

To create a custom CqlSession bean this article is a great resource.

clunven
  • 1,360
  • 6
  • 13