Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/daggerok/spring-streaming-with-kafka

gradle, docker-compose, spring-boot, spring-cloud-stream, kafka, @EnableBinding, Sink, Source, Processor
https://github.com/daggerok/spring-streaming-with-kafka

docker docker-compose kafka

Last synced: 6 days ago
JSON representation

gradle, docker-compose, spring-boot, spring-cloud-stream, kafka, @EnableBinding, Sink, Source, Processor

Awesome Lists containing this project

README

        

# Streaming (spring spring-cloud-stream kafka)

Greater -> (messages) -> GreatingHandler -> (uppercased) -> Doubler -> (transformed) -> LogReceiver

```bash
gradle composeUp

gradle Greater:bootRun
gradle MessageReceiver:bootRun

gradle UpperCaser:bootRun
gradle Doubler:bootRun
gradle Logger:bootRun

gradle composeDown
gradle --stop
```

run all together for integration tests

```bash
gradle clean build
```

for testing run in order:
- kafka using docker-compose (read below)
- GreaterApplication
- UpperCaserApplication
- DoublerApplication
- LoggerApplication
- LogReceiverApplication (another logger)

_run kafka in docker-compose_

```bash
# git clone --depth=1 https://github.com/confluentinc/cp-docker-images.git
# docker-compose -f cp-docker-images/examples/kafka-single-node/docker-compose.yml up -d
# docker-compose -f cp-docker-images/examples/kafka-single-node/docker-compose.yml down -v --rmi local
## or already cloned locally:
# docker-compose -f kafka/kafka-single-node/docker-compose.yml up -d
# docker-compose -f kafka/kafka-single-node/docker-compose.yml down -v --rmi local
## or:
# docker-compose up -d
# docker-compose down -v --rmi local
## or just:
./gradlew composeUp
./gradlew composeDown
```