flowchart LR
ExternalApp["External CHS App"] -->|REST| Module1
Module1["sender-api"] -->|Kafka| Module2
Module2["📌 kafka-consumer"] -->|REST| Module3
Module3["govuk-notify-api"] -->|REST| GovUKNotify
GovUKNotify["GovUK Notify"]
subgraph PoseidonSystem["🔱 chs-notification"]
Module1
Module2
Module3
end
%% Styling for all elements - light/dark mode compatible
classDef normal fill:#f8f8f8,stroke:#666666,stroke-width:1px,color:#333333,rx:4,ry:4
classDef current fill:#0099cc,stroke:#007799,stroke-width:2px,color:white,rx:4,ry:4
classDef external fill:#e6e6e6,stroke:#999999,stroke-width:1px,color:#333333,rx:4,ry:4
classDef system fill:transparent,stroke:#0077b6,stroke-width:1.5px,stroke-dasharray:3 3,color:#00a8e8,rx:10,ry:10
class Module1 normal;
class Module2 current;
class Module3 normal;
class ExternalApp external;
class GovUKNotify external;
class PoseidonSystem system;
%% Adding clickable links to GitHub repos
click Module1 "https://github.com/companieshouse/chs-notification-sender-api" _blank
click Module3 "https://github.com/companieshouse/chs-gov-uk-notify-integration-api" _blank
This service:
- Consumes notification messages from Kafka topics
- Forwards messages to chs-gov-uk-notify-integration-api (Module 3) via REST
- Is Module 2 of 3 in the chs-notification system
- chs-notification-sender-api (Module 1, accepts email/letter requests via REST and publishes to Kafka topics consumed by Module 2)
- chs-gov-uk-notify-integration-api (Module 3, receives requests from Module 2 via REST and sends to GovUK Notify via REST)
Sends email and letter requests to chs-gov-uk-notify-integration-api (Module 3).
The service exposes the following endpoints:
- Service health:
GET /notification-consumer/healthcheck
- Java 21
- Maven
Start a Kafka broker to allow messages to be consumed:
docker compose up KafkaBroker
- Open the project in IntelliJ
- Set Project SDK to Java 21
- Locate the main application class: ChsNotificationKafkaConsumerApplication.java
- Right-click and select "Run" or "Debug"
mvn spring-boot:run
chs-notification-kafka-consumer/
│── src/
│ ├── main/ # Main application code
│ └── test/ # Test code
│── pom.xml # Dependencies
│── ecs-image-build/ # ECS Dockerfile
│── terraform/ # Infrastructure code
│── ... # Other files/folders
└── README.md # This file