Safe queue or job versioning #3241
Unanswered
saschabratton
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I haven't seen this pattern used before but in order to completely clean a queue without leaving any keys you would need to use the "obliterate" method for the queue. The amount of data left by a queue depends quite much on the settings you have for the completed and failed jobs, if you do not keep any jobs in completed or failed status the amount of memory consumed by the queue is quite minimal. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to version queues (or jobs) so that when new versions of the application are deployed, the old workers can finish out the old type of job, but not pickup the new ones.
I was going to use a queue name, e.g.
queue-type/v${version}
. So when I launch the new deployment, it will start putting new events to the new version of queue and the new workers will pick them up only. Because the message router is no longer using the old version of queue, no new jobs will be added, and the old workers can complete any jobs remaining and then shutdown the instances.However, is this a problem or antipattern? Would this potentially create some fragments in the memory store that aren't cleaned very well? Or is there a better pattern for handling this?
Beta Was this translation helpful? Give feedback.
All reactions