Home > OS >  Is it possible to subscribe a Redis message channel synchronously?
Is it possible to subscribe a Redis message channel synchronously?

Time:10-19

When I register a callback (=subscribing) to a Redis message channel, my callback will be called asynchronously, which may occur cocurrency issues since the same callback is called several times and all sharing the same data set.

Is there a way to tell Redis only call the same callback once each time (=call next only after the current one is returned), or I need to create a task queue by myself?

CodePudding user response:

Yes, you need create a task queue by yourself, Redis do not support blocked callback.

  • Related