Skip to content

Await on redis.subscribe()#62

Open
ifullgaz wants to merge 1 commit intoboringnode:0.xfrom
ifullgaz:wait-for-redis-subscription
Open

Await on redis.subscribe()#62
ifullgaz wants to merge 1 commit intoboringnode:0.xfrom
ifullgaz:wait-for-redis-subscription

Conversation

@ifullgaz
Copy link
Copy Markdown

Await on redis.subscribe() to ensure that the method returns only after Redis has acknowledged the registration of the subscriber.

This comes as a resolution to an edge case encountered in such a case:

  • Server 1:
  • subscribes to channel 'request'
  • Server 2:
  • subscribes to channel 'response'
  • sends message on channel 'request'
  • Server 2:
  • receives message from channel 'request'
  • sends message to channel 'response'

Server 1 may not have been registered yet as a subscriber and misses the message.

@ifullgaz ifullgaz force-pushed the wait-for-redis-subscription branch from f8b1573 to acef0fc Compare April 15, 2026 23:13
@ifullgaz ifullgaz force-pushed the wait-for-redis-subscription branch from acef0fc to b46b21a Compare May 1, 2026 02:44
…er Redis has acknowledged the registration of the subscriber.

Add return number of subscribers on publish
Fix MaxListenersExceededWarning when subscribing to too many channels with Redis transport
@ifullgaz ifullgaz force-pushed the wait-for-redis-subscription branch from b46b21a to a7fd479 Compare May 1, 2026 09:15
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