# swjuyhz/spring-boot-spark-streaming-kafka-sample architecture

> Architecture diagram of the GitHub repository swjuyhz/spring-boot-spark-streaming-kafka-sample, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/swjuyhz/spring-boot-spark-streaming-kafka-sample
- Repository: https://github.com/swjuyhz/spring-boot-spark-streaming-kafka-sample

## Overview

This small sample demonstrates integrating Spark Streaming and Kafka with Spring Boot. Its likely runtime path is application startup into the stream executor, but source excerpts are unavailable, so only the README-documented integration is linked; internal call ownership and configuration behavior cannot be verified.

Main entry points: [`src/main/java/com/swjuyhz/sample/sparkstream/executor/SparkKafkaStreamExecutor.java`](https://github.com/swjuyhz/spring-boot-spark-streaming-kafka-sample/blob/master/src/main/java/com/swjuyhz/sample/sparkstream/executor/SparkKafkaStreamExecutor.java) (Spark-Kafka stream), [`src/main/java/com/swjuyhz/sample/SampleApplication.java`](https://github.com/swjuyhz/spring-boot-spark-streaming-kafka-sample/blob/master/src/main/java/com/swjuyhz/sample/SampleApplication.java) (Spring Boot app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_spring_app["Spring Boot app"]
  node_startup["Startup lifecycle"]
  node_spark_config["Spark configuration<br/>[SparkConfig.java]"]
  node_stream_executor["Spark-Kafka stream"]
end

node_kafka[("Kafka")]

node_spring_app -->|"integrates with"| node_stream_executor
node_stream_executor -->|"streams with"| node_kafka

click node_spring_app "https://github.com/swjuyhz/spring-boot-spark-streaming-kafka-sample/blob/master/src/main/java/com/swjuyhz/sample/SampleApplication.java"
click node_startup "https://github.com/swjuyhz/spring-boot-spark-streaming-kafka-sample/blob/master/src/main/java/com/swjuyhz/sample/sparkstream/ApplicationStartup.java"
click node_spark_config "https://github.com/swjuyhz/spring-boot-spark-streaming-kafka-sample/blob/master/src/main/java/com/swjuyhz/sample/config/SparkConfig.java"
click node_stream_executor "https://github.com/swjuyhz/spring-boot-spark-streaming-kafka-sample/blob/master/src/main/java/com/swjuyhz/sample/sparkstream/executor/SparkKafkaStreamExecutor.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_spring_app,node_startup,node_spark_config,node_stream_executor toneBlue
class node_kafka toneAmber
```

## Components

### Application runtime

- [Spring Boot app](https://github.com/swjuyhz/spring-boot-spark-streaming-kafka-sample/blob/master/src/main/java/com/swjuyhz/sample/SampleApplication.java): `src/main/java/com/swjuyhz/sample/SampleApplication.java`
- [Startup lifecycle](https://github.com/swjuyhz/spring-boot-spark-streaming-kafka-sample/blob/master/src/main/java/com/swjuyhz/sample/sparkstream/ApplicationStartup.java): `src/main/java/com/swjuyhz/sample/sparkstream/ApplicationStartup.java`
- [Spark configuration](https://github.com/swjuyhz/spring-boot-spark-streaming-kafka-sample/blob/master/src/main/java/com/swjuyhz/sample/config/SparkConfig.java): `src/main/java/com/swjuyhz/sample/config/SparkConfig.java`
- [Spark-Kafka stream](https://github.com/swjuyhz/spring-boot-spark-streaming-kafka-sample/blob/master/src/main/java/com/swjuyhz/sample/sparkstream/executor/SparkKafkaStreamExecutor.java): `src/main/java/com/swjuyhz/sample/sparkstream/executor/SparkKafkaStreamExecutor.java`

### Other components

- **Kafka**

## Connections

- Spring Boot app → Spark-Kafka stream: integrates with (evidence: `README.md`)
- Spark-Kafka stream → Kafka: streams with (evidence: `README.md`)
