hld
lld
API Endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /info |
Service health check |
| POST | /tickets |
Create email ticket (status = PENDING) for async dispatch |
Scenario: The Booking Service successfully processes a payment and pushes a notification event. The Notification Service consumes it and sends an email.
noti-queue instantly, returning a fast response to the user, while this service handles the slow dispatch in the background.channel.ack)?
ack() only after sendEmail resolves, unacknowledged messages will safely return to the queue if the connection drops.Ticket table in the database?
Answer: Auditing and Retry Mechanisms. Using the TicketRepository.getPendingTickets() method , we can run a cron job to fetch tickets stuck in the PENDING state and attempt to retry dispatching them in case of temporary SMTP failures .
+2