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.

…er Redis has acknowledged the registration of the subscriber.
@ifullgaz ifullgaz force-pushed the wait-for-redis-subscription branch from f8b1573 to acef0fc Compare April 15, 2026 23:13
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