1- # Polling Publisher-Subscriber System
1+ # Polling Publisher-Subscriber Microservice Pattern
22
33This 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```
1010polling-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
4141mvn 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:
0 commit comments