Skip to content

Where/When shall we initialize queues #1962

Answered by ahmedabdou14
ahmedabdou14 asked this question in Q&A
Discussion options

You must be logged in to vote

For future visitors:
Instantiating a new queue when needed in your APIs with a redis connection from a connection pool is the best option imo. Having global queues using the same connection over and over again for the lifetime of the server is not a good idea. At the end of the day, you won't face the overhead of a new connection, the pooler would just give you a cached live connection and if any connection fails, the pooler will handle it aswell.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ahmedabdou14
Comment options

Answer selected by ahmedabdou14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants