- Shipped
- August 6, 2026 at 10:06 PM UTC
- Author
- Kamo
- Commit
- e362673
Connection.publish on legal.packages.{memberId}, NOT NatsMessageService: that service pins .expectedStream(CHAT_MESSAGES) in both publish and publishSync, so a JetStream publish on a legal subject is refused by the server and every count update would vanish silently. The count is read inside the caller's transaction (Hibernate auto-flushes before the count query, so the value is the post-commit value) and only the send is deferred through LegalAfterCommit. Reading from afterCommit would query a completed transaction; a rollback needs no handling because afterCommit never fires. Nothing here throws. Spring propagates an afterCommit exception to the caller, and a dead broker must not turn a Finish that already wrote an append-only attestation into a 500. natsConnection is required=false and is null in production today — DocsService has no nats block in its configmap — so the publisher degrades to a no-op and the REST seed carries the badge. memberId is a STRING in the payload. It is a unique_rowid() past Number.MAX_SAFE_INTEGER and the browser parses this with JSON.parse.