Develop - #13
Merged
Merged
Conversation
…o de status idempotente
…og do OutboxRelay
Charge lifecycle: transições de status, GET, idempotência, webhooks e confiabilidade do outbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Promove pra
maino conteúdo já mergeado emdevelopvia #12 — ciclo de vida completo da cobrança, idempotência, webhooks e confiabilidade/observabilidade do outbox.Domínio e API
Charge.transitionTo()com máquina de estados explícita (ACTIVE → PAID/EXPIRED/CANCELLED) +expiresAtpersistido de verdadeGET /charges/{id}comChargeNotFoundException→ 404POST /chargesvia headerIdempotency-KeyPOST /webhooks/provider— processamento idempotente de notificações do provedor PixChargeExpirationJob) expira cobranças vencidas automaticamenteConfiabilidade do outbox
OutboxRelaymigrado praSELECT ... FOR UPDATE SKIP LOCKED(segurança multi-instância)Logger5w1hBuildercorrelationIddo request original pro log de falha de publishObservabilidade
charges_created_total,webhooks_processed_total,outbox_events_*)Logger5w1h(mensagem real no log, antes gravavanull)Persistência
ddl-auto: updatepra Flyway (schema versionado,ddl-auto: validate)Arquitetura
Test plan
./mvnw clean verifycom Docker real: 40 testes unitários + 16 de integração, tudo verdespotless:check/checkstyle:checksem violações