Sample template for building real-time processing applications with Kafka & Redis
You will need running Kafka & Redis instances. To set them up, see:
- Kafka Quickstart: https://kafka.apache.org/quickstart
- Redis Quickstart: https://redis.io/topics/quickstart
- Main "high-level" dataflow should be scripted into a class implementing
TopologyConstructorinterface underconstructTopologymethod (seeSampleTopologyConstructor) - Implement your data transformation logic from a variety of transformation interfaces provided by Kafka Streams (e.g.
ValueMapper,Transformer, etc), which will be used by theconstructTopologymethod - For more information, see: https://kafka.apache.org/documentation/streams/
- To pipe in test data through Topology/Tranformations, extend the
StreamsIntegrationTestBaseclass (see exampleSampleIntegrationTestBase)
- To build the application, cd to project home and execute
mvn clean install
kafka.security.integrationin application.properties - to set to true for integration with Kerberosredis.isclusterin application.properties - to use redis cluster mode- Alternative: Use of
@Profile("myprofile")to instantiate conditional beans (e.g.KafkaSecurityConfiguration) - Alternative: Use of
havingValue =in@ConditionalOnPropertyannotation to turn on/off features
- Kafka - Distributed Streaming Platform for Realtime Data Processing
- Redis - In-Memory NoSQL KV Database
- Spring Boot - Opinionated Framework for Spring Based Applications for Dependency Injections
- Java - OpenJDK from AdoptOpenJDK
- Maven - Dependency Management
- Lombok - Framework for Reducing Boilerplate Codes