-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Job_id #132
Comments
No, there is no way to do it, and it would'nt be recommended either since we want to guarantee unique ids for every job. Why do you need this functionality? |
Why not add an id to the job data, thats what we do. Bulls jobid is an integral part of a lot of functionality within bull and really shouldn't be part of your implementation, other than pointing to said job. |
I implemented the pattern "message queue" in my application, specifically I have multiple instances listen on a channel Redis, each instance reads messages that pass in this channel and put them in a queue. Unfortunately I can not move the queue before these instances, so if I have n instances that are listening to the channel, i have n identical messages placed in the queue. If I could set a custom identifier, i could overwrite or check that the message has not been added to the queue. |
@Giuffre Are you pushing messages back onto the queue because your listener should not be handling that particular message? If so, you probably want to use a pub-sub model instead of a queue. Redis ships with this feature. If that's not the case, could you differentiate between the "listeners" in your previous post? Are these "listeners" generating new jobs or receiving the output from the completed jobs? |
I'd like to reopen this. We have a situation at Mixmax where we have a very high volume of jobs, and we need a concurrency-safe way of ensuring there's only ever one job of a certain type for each user at any given time. If we could pass Happy to do a PR for this. Unless anyone has any advice to the contrary? |
As above, see #335 |
is there a way to set a custom Job_id for a queue?
The text was updated successfully, but these errors were encountered: