I am building a GraphQL server to serve my clients. The server executes my mutations/queries, but also triggers subscriptions.
The same server should wait on a redis queue (LPOP or BLPOP), in order to get certain notifications, later to be send back to the client via subscription.
Where/how should I place the code to listen to this redis queue, without blocking the GraphQL server of receiving requests?
question from:
https://stackoverflow.com/questions/65882905/apollo-graphql-server-that-waits-on-redis-queue 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…