Skip to content

Commit 4eeb011

Browse files
committed
updated all README.md
1 parent 5aa46ac commit 4eeb011

File tree

3 files changed

+23
-41
lines changed

3 files changed

+23
-41
lines changed

Diff for: polling-publisher/README.md

+9-23
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# Polling Publisher-Subscriber System
1+
# Polling Publisher-Subscriber Microservice Pattern
22

33
This project implements a **Polling Publisher-Subscriber** system using **Spring Boot** and **Apache Kafka**. It consists of two microservices:
44

5-
1. **Publisher Module** → Periodically polls a data source and publishes updates via Kafka.
6-
2. **Subscriber Module** → Listens to Kafka for updates and processes them.
5+
1. **Publisher Service** → Periodically polls a data source and publishes updates via Kafka.
6+
2. **Subscriber Service** → Listens to Kafka for updates and processes them.
77

88
## 📌 **Project Structure**
99
```
1010
polling-publisher-subscriber/
1111
│️— pom.xml (Parent POM)
1212
│️— README.md (This file)
1313
14-
├── publisher-module/
15-
│ ├── src/main/java/com/iluwatar/polling-service/
14+
├── polling-service/
15+
│ ├── src/main/java/com/iluwatar/polling/
1616
│ ├── src/main/resources/application.yml
1717
│ ├── pom.xml
1818
│ └── README.md (Polling-specific documentation)
1919
20-
├── subscriber-module/
21-
│ ├── src/main/java/com/iluwatar/subscriber-service/
20+
├── subscriber-service/
21+
│ ├── src/main/java/com/iluwatar/subscriber/
2222
│ ├── src/main/resources/application.yml
2323
│ ├── pom.xml
2424
│ └── README.md (Subscriber-specific documentation)
@@ -41,21 +41,7 @@ docker-compose up -d
4141
mvn clean install
4242
```
4343

44-
### 3️⃣ **Run the Publisher Module**
44+
### 3️⃣ **Run Service**
4545
```sh
46-
mvn spring-boot:run -pl publisher-module
46+
mvn spring-boot:run
4747
```
48-
49-
### 4️⃣ **Run the Subscriber Module**
50-
```sh
51-
mvn spring-boot:run -pl subscriber-module
52-
```
53-
54-
## 📝 **Endpoints**
55-
| Service | Endpoint | Description |
56-
|---------|----------|-------------|
57-
| Publisher | `GET /publish` | Manually trigger data publishing |
58-
| Subscriber | (Kafka Consumer) | Listens for updates |
59-
60-
## 🛠 **Testing**
61-
You can test Kafka messages using:

Diff for: polling-publisher/polling-service/README.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
**README.md** (Inside `polling-module/`)
33

44

5-
## Publisher Module
5+
## Publisher Microservice
66

77
This module is responsible for **polling a data source** at regular intervals and publishing updates to Kafka.
88

@@ -16,7 +16,12 @@ This module is responsible for **polling a data source** at regular intervals an
1616
```
1717
publisher-module/
1818
│️— src/main/java/com/iluawatar/polling/
19-
| ├── App.java
19+
| ├── App.java
20+
│ ├── DataRepository.java
21+
│ ├── DataSourceService.java
22+
│ ├── KafkaProducer.java
23+
│ ├── PollingController.java
24+
│ └── PollingScheduler.java
2025
2126
│️— pom.xml
2227
│️— README.md (This file)
@@ -29,8 +34,8 @@ mvn spring-boot:run
2934
```
3035

3136
## 📝 **Endpoints**
32-
| Method | Endpoint | Description |
33-
|--------|----------|-------------|
34-
| `GET` | `/publish` | Manually trigger data publishing |
37+
| Method | Endpoint | Description |
38+
|--------|------------------|----------------------------------|
39+
| `GET` | `/health` | check health of polling |
40+
| `POST` | `/send?message=""` | Manually trigger data publishing |
3541

36-
## 🛠 **Testing Kafka Output**

Diff for: polling-publisher/subscriber-service/README.md

+3-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# **Subscriber**
22
README.md (Inside `subscriber-module/`)
33

4-
## Subscriber Module
4+
## Subscriber Microservice
55

6-
This module **listens** to Kafka topic **`updates_topic`** and processes updates.
6+
This module **listens** to Kafka topic **`updates & API`** and processes data.
77

88
## How It Works
99
- Uses **Spring Kafka** to consume messages.
@@ -15,6 +15,7 @@ This module **listens** to Kafka topic **`updates_topic`** and processes updates
1515
subscriber-module/
1616
│➜ src/main/java/com/example/subscriber/
1717
| ├── App.java
18+
| |-- KafkaConsumer.java
1819
1920
│➜ pom.xml
2021
│➜ README.md (This file)
@@ -25,14 +26,4 @@ subscriber-module/
2526
mvn spring-boot:run
2627
```
2728

28-
## Testing
29-
Verify subscriber output:
30-
```sh
31-
mvn spring-boot:run
32-
```
33-
Expected console output:
34-
```
35-
36-
```
37-
3829
---

0 commit comments

Comments
 (0)