Keep retrying the indexer's durable NATS consumer after a deploy

FixEmailService
Shipped
August 5, 2026 at 11:23 PM UTC
Author
Kamo
Commit
038196a

A rolling deploy overlaps pods and the outgoing one still holds the durable consumer, so the incoming pod's bind to "email-metadata-indexer" fails with [SUB-90012] Consumer is already bound to a subscription. start() ran once from @PostConstruct, logged the error and gave up, so push indexing stayed dead for the entire life of that pod -- every deploy silently stopped indexing new mail until someone restarted it by hand, and nothing surfaced that it had happened. Retry on a daemon scheduler until the old pod releases the consumer, and stop cleanly on shutdown so the retry cannot outlive the bean.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing