Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : re organize modules #471

Merged
merged 6 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
"component : avro":
- changed-files:
- any-glob-to-any-file: 'kafka-avro/**/*'
"component : dsl-integration":
- changed-files:
- any-glob-to-any-file: 'kafka-dsl-integration/**/*'
"component : reactor":
- changed-files:
- any-glob-to-any-file: 'kafka-reactor/**/*'
Expand All @@ -9,10 +12,16 @@
- any-glob-to-any-file: 'kafka-sample/**/*'
"component : spring-boot":
- changed-files:
- any-glob-to-any-file: 'kafka-spring/**/*'
- any-glob-to-any-file: 'kafka-spring-boot/**/*'
"component : streams":
- changed-files:
- any-glob-to-any-file: 'kafka-streams/**/*'
"component : cloud":
- changed-files:
- any-glob-to-any-file: 'kafka-cloud/**/*'
"component : modulith":
- changed-files:
- any-glob-to-any-file: 'kafka-modulith-outbox-pattern/**/*'
"type: documentation":
- changed-files:
- any-glob-to-any-file: 'docs/**/*'
8 changes: 4 additions & 4 deletions .github/workflows/kafka-sample-spring-cloud.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: kafka-sample-spring-cloud
name: kafka-spring-cloud-sample

on:
push:
paths:
- "kafka-sample/spring-cloud/**"
- "spring-cloud/**"
branches: [ main ]
pull_request:
paths:
- "kafka-sample/spring-cloud/**"
- "spring-cloud/**"
types:
- opened
- synchronize
Expand All @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "kafka-sample/spring-cloud"
working-directory: "spring-cloud"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/kafka-sample-spring-modulith.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: kafka-sample-spring-modulith-outbox-pattern
name: kafka-spring-modulith-outbox-pattern-sample

on:
push:
paths:
- "kafka-sample/spring-modulith-outbox-pattern/**"
- "spring-modulith-outbox-pattern/**"
branches: [ main ]
pull_request:
paths:
- "kafka-sample/spring-modulith-outbox-pattern/**"
- "spring-modulith-outbox-pattern/**"
types:
- opened
- synchronize
Expand All @@ -18,9 +18,9 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "kafka-sample/spring-modulith-outbox-pattern"
working-directory: "spring-modulith-outbox-pattern"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/kafka-spring-boot-integration-dsl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: kafka-spring-boot-integration-dsl
on:
push:
paths:
- "kafka-spring/kafka-dsl-integration/**"
- "kafka-dsl-integration/**"
branches: [ main ]
pull_request:
paths:
- "kafka-spring/kafka-dsl-integration/**"
- "kafka-dsl-integration/**"
types:
- opened
- synchronize
Expand All @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "kafka-spring/kafka-dsl-integration"
working-directory: "kafka-dsl-integration"
steps:
- uses: actions/checkout@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: spring-boot-multiple-producers-consumers
on:
push:
paths:
- "kafka-spring/spring-boot-multiple-producers-consumers/**"
- "kafka-spring-boot/spring-boot-multiple-producers-consumers/**"
branches: [ main ]
pull_request:
paths:
- "kafka-spring/spring-boot-multiple-producers-consumers/**"
- "kafka-spring-boot/spring-boot-multiple-producers-consumers/**"
types:
- opened
- synchronize
Expand All @@ -19,10 +19,10 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: kafka-spring/spring-boot-multiple-producers-consumers
working-directory: kafka-spring-boot/spring-boot-multiple-producers-consumers

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/kafka-spring-boot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: kafka-spring-boot
on:
push:
paths:
- "kafka-spring/spring-boot/**"
- "kafka-spring-boot/spring-boot-sample/**"
branches: [ main ]
pull_request:
paths:
- "kafka-spring/spring-boot/**"
- "kafka-spring-boot/spring-boot-sample/**"
types:
- opened
- synchronize
Expand All @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "kafka-spring/spring-boot"
working-directory: "kafka-spring-boot/spring-boot-sample"
steps:
- uses: actions/checkout@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM gitpod/workspace-full
USER root

RUN bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh \
&& sdk install java 21.0.1-graalce \
&& sdk default java 21.0.1-graalce"
&& sdk install java 21.0.2-graalce \
&& sdk default java 21.0.2-graalce"


12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ Kafka has a number of key features that make it a popular choice for data proces

This repository contains sample projects integrating with kafka using different mechanisms available

- [sample](./kafka-sample)
- [streams](./kafka-streams/README.md)
- [reactor](./kafka-reactor/README.md)
- [avro](./kafka-avro/README.md)
- [DSL integration](./kafka-dsl-integration/ReadMe.md)
- [reactor](./kafka-reactor/README.md)
- [sample](./kafka-sample)
- [Examples using spring boot](./kafka-spring-boot/README.md)
- [kafka streams implementation](./kafka-streams/README.md)
- [Kafka implementation using cloud bindings](./spring-cloud/README.md)
- [Outbox Pattern Implementation using Modulith](./spring-modulith-outbox-pattern/README.md)




### Reference
Expand Down
33 changes: 33 additions & 0 deletions kafka-dsl-integration/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# spring-dsl-integration

### Format code

```shell
$ ./mvnw spotless:apply
```

### Run tests

```shell
$ ./mvnw clean verify
```

### Run locally

```shell
$ docker-compose -f docker/docker-compose.yml up -d
$ ./mvnw spring-boot:run -Dspring-boot.run.profiles=local
```

### Using Testcontainers at Development Time
You can run `TestApplication.java` from your IDE directly.
You can also run the application using Maven as follows:

```shell
./mvnw spring-boot:test-run
```


### Useful Links
* Swagger UI: http://localhost:8080/swagger-ui.html
* Actuator Endpoint: http://localhost:8080/actuator
File renamed without changes.
16 changes: 16 additions & 0 deletions kafka-dsl-integration/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
spring.application.name=kafka-dsl-integration

app.kafka.topic=simple.topic
app.kafka.newTopic=simple.new.topic
app.kafka.messageKey=simple.key

spring.kafka.consumer.group-id=simpleTestGroup
spring.kafka.consumer.auto-offset-reset=earliest
spring.kafka.consumer.enable-auto-commit=false
#spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer
#spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.producer.batch-size=16384
spring.kafka.producer.buffer-memory=33554432
spring.kafka.producer.retries=1
#spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
#spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer
1 change: 0 additions & 1 deletion kafka-sample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ This folder contains sample kafka producer and consumer using java, spring & Spr
|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
| [Java](./java) | Producing and consuming Messages using Plain Java and Kafka |
| [Spring](./spring) | Producing and consuming Messages using Pure Spring |
| [Spring Cloud](./spring-cloud) | Producing and consuming Messages using Spring Cloud |
1 change: 0 additions & 1 deletion kafka-spring/README.md → kafka-spring-boot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ This folder contains sample kafka producer and consumer using java, spring & Spr
| Type | Description |
|------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
| [Spring Boot](./spring-boot) | Producing and consuming Messages using Spring Boot |
| [Spring Integration using kafka DSL](./kafka-dsl-integration) | Producing and consuming Messages using Spring Integration DSL |
| [Multiple Producers & Consumers](./spring-boot-multiple-producers-consumers) | Producing and consuming Messages from Multiple Producer and consumers using Spring Boot |

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading