github gofr-dev/gofr v1.56.1

13 hours ago

🛠️ Fixes

  • Redis Streams PubSub CPU Busy-Spin — When the message buffer was full, subscribeToStream looped at 100% CPU with no backoff because consumeStreamMessages returned immediately on zero capacity. Added a
    time.After backoff using the existing subscribeRetryInterval, following the same pattern used in the Subscribe connection-wait loop.

  • Redis Streams Goroutine Leak on Shutdown — The subscription context created in ensureSubscription was discarded (_, cancel := ...) and runSubscriptionLoop used a fresh context.Background(), making
    goroutines impossible to cancel. The cancelable context is now propagated through the full call chain, and Close() no longer holds the write lock while waiting for goroutines (which previously caused a
    guaranteed 5-second deadlock on every shutdown).

  • Redis Streams Reconnection FailureresubscribeAll was silently a no-op for streams — it canceled a context nobody held and never started a new goroutine. It now properly waits for old goroutines to exit
    and starts new ones with fresh contexts, preserving the consumer name across resubscribes to maintain PEL ownership and prevent message loss.

Don't miss a new gofr release

NewReleases is sending notifications on new releases.