Skip to content
 
 

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSE Kafka Stockticks

The goal of this sample is to have a producer generate stock tick data and write to the tick-stream topic and then have a consumer read from the topic and write the tick data to a Cassandra table.

Setup

First start Kafka and add the topic tick-stream following these basic instructions.

Download and start DSE.

Setup the Cassandra schema by running the SchemaSetup class. Note: the keyspace replication settings use SimpleStrategy. Modify as needed.

Running

Create the schema in DSE

mvn clean compile exec:java -Dexec.mainClass=com.datastax.tickdata.utils.SchemaSetup

Start the TickProducer with the desired number of events.

mvn clean compile exec:java -Dexec.mainClass=com.datastax.tickdata.producer.TickProducer

Start the TickConsumer.

mvn clean compile exec:java -Dexec.mainClass=com.datastax.tickdata.consumer.TickConsumer

Verification

You can run the following in cqlsh:

select * from datastax_tickdata_demo.tick_data ;

Reference: Patrick Callaghan's datastax-kafka-example.

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages