feat: add RabbitMQ worker, contracts, usage UI in channels screen
- Add HrynCo.NotificationService.Contracts project with SendEmailMessage and NotificationResultMessage - Add SendEmailConsumer (RabbitMQ worker) with reply-to pattern via CorrelationContext.ReplyTo - Add SendEmailHandler owning SMTP send + usage increment as business logic - Add GetChannelUsageSummaryHandler with single DB query via navigation property - Merge usage stats inline into channels list (daily/monthly with progress bars) - Refactor AdminChannelsController.Index to use GetChannelUsageSummaryQuery - Add RabbitMQ service to docker-compose files - Remove dead AdminChannelUsageController, ChannelUsageViewModel, ChannelUsageSummary Ref: IT-628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
name: hrynco-notification-service
|
||||
|
||||
services:
|
||||
migrator:
|
||||
environment:
|
||||
@@ -15,7 +17,29 @@ services:
|
||||
environment:
|
||||
- DOTNET_ENVIRONMENT=Development
|
||||
- App__ConnectionString=Host=db;Port=5432;Database=notification_service;Username=postgres;Password=postgres
|
||||
- App__RabbitMq__Host=rabbitmq
|
||||
- App__RabbitMq__User=guest
|
||||
- App__RabbitMq__Password=guest
|
||||
- Serilog__WriteTo__1__Args__serverUrl=http://seq
|
||||
depends_on:
|
||||
rabbitmq:
|
||||
condition: service_healthy
|
||||
|
||||
rabbitmq:
|
||||
image: rabbitmq:4-management-alpine
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: guest
|
||||
RABBITMQ_DEFAULT_PASS: guest
|
||||
ports:
|
||||
- "5672:5672"
|
||||
- "15672:15672"
|
||||
healthcheck:
|
||||
test: ["CMD", "rabbitmq-diagnostics", "ping"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
volumes:
|
||||
- notification_rabbitmq:/var/lib/rabbitmq
|
||||
|
||||
db:
|
||||
image: postgres:17
|
||||
@@ -40,4 +64,5 @@ services:
|
||||
|
||||
volumes:
|
||||
notification_db:
|
||||
notification_seq:
|
||||
notification_seq:
|
||||
notification_rabbitmq:
|
||||
Reference in New Issue
Block a user