Skip to content

refactor: remover RabbitMQ e SendGrid, email síncrono via Resend/Mailtrap#27

Merged
Morgana-Claw merged 2 commits intomasterfrom
develop
Apr 1, 2026
Merged

refactor: remover RabbitMQ e SendGrid, email síncrono via Resend/Mailtrap#27
Morgana-Claw merged 2 commits intomasterfrom
develop

Conversation

@Morgana-Claw
Copy link
Copy Markdown
Collaborator

@Morgana-Claw Morgana-Claw commented Apr 1, 2026

Resumo

Remove RabbitMQ (messaging assíncrono) e SendGrid, substituindo por email síncrono via Resend (produção) ou Mailtrap (desenvolvimento).

O que mudou

Removido

  • Projeto ClientManager.Infrastructure.Messaging (RabbitMQ)
  • RabbitMQ.Client NuGet dependency
  • IMessageBus, CustomerCreatedEvent, DocumentUploadedEvent
  • CustomerCreatedConsumer, DocumentUploadedConsumer, MessageBusWorker
  • SendGridEmailService.cs e pacote SendGrid
  • RabbitMQ de appsettings, docker-compose.yml, render.yaml
  • Referências a SendGrid/RabbitMQ na documentação

Adicionado

  • IWelcomeEmailHandler (Domain.Core)
  • WelcomeEmailHandler — gera PDF + envia email sincronamente
  • DI: Resend (produção) → Smtp/Mailtrap (dev), sem fallback SendGrid

Atualizado

  • CustomerApplication → usa IWelcomeEmailHandler em vez de IMessageBus
  • DocumentApplication → remove dependência de IMessageBus
  • ServicesCollectionExtensions → DI atualizada
  • Program.cs → sem registros de messaging
  • Todos os testes atualizados

Verificação

  • Build: 0 erros, 120 warnings (pre-existentes CA1707/CA1822)
  • Tests: 114/114 passed (100%)
  • SendGrid: removido completamente
  • RabbitMQ: removido completamente
  • Fluxo email: Resend (prod) / Mailtrap (dev)

Branches limpos

- Removed entire ClientManager.Infrastructure.Messaging project (RabbitMQ)
- Removed RabbitMQ.Client NuGet dependency from Infrastructure
- Removed IMessageBus interface, CustomerCreatedEvent, DocumentUploadedEvent
- Removed CustomerCreatedConsumer, DocumentUploadedConsumer, MessageBusWorker
- Created IWelcomeEmailHandler interface (Domain.Core)
- Created WelcomeEmailHandler service (Infrastructure) — handles PDF generation + email synchronously
- Updated CustomerApplication to use IWelcomeEmailHandler instead of IMessageBus
- Updated DocumentApplication to remove IMessageBus dependency
- Updated DI registration in ServicesCollectionExtensions
- Updated Program.cs to remove messaging registrations
- Updated all tests to reflect new architecture

Build: 0 errors, 0 new warnings
Tests: 114/114 passed (100%)
…ap (dev)

- Deleted SendGridEmailService.cs
- Removed SendGrid NuGet package from Infrastructure.csproj
- Updated DI registration: Resend > Smtp (no SendGrid fallback)
- Removed RabbitMQ from: appsettings, docker-compose.yml, render.yaml
- Updated README.md and tooling.md (no more SendGrid/RabbitMQ refs)
- Build: 0 errors, 120 warnings (pre-existing CA1707/CA1822)
- Tests: 114/114 passed (100%)
@Morgana-Claw Morgana-Claw changed the title refactor: remover RabbitMQ, email síncrono via WelcomeEmailHandler refactor: remover RabbitMQ e SendGrid, email síncrono via Resend/Mailtrap Apr 1, 2026
@Morgana-Claw Morgana-Claw merged commit 3c55577 into master Apr 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant