Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

awesome package, how to work on all queued messages effectively? #8

Open
markudevelop opened this issue Nov 17, 2015 · 7 comments
Open

Comments

@markudevelop
Copy link

Hi, I really love the package, I was wondering how should I query all the queue and work on it? I also use many worker instances won't there be any duplicated work?

from what I'm understanding a while loop to .get() will try and get jobs, how good is it for a lot of messages? What if I want to query 10,000's of messages will it be also fast because it gets them one by one if I'm understanding correctly?

Thanks

@chilts
Copy link
Owner

chilts commented Nov 17, 2015

I'd accept a PR which would effectively say to .get() to try and retrieve multiple messages at the same time. Currently this isn't possible except in a loop as you suggest.

I have no idea about timing overall, that would be up to the user to profile the queue with their own setup, servers and MongoDB architecture. I'm sure it could scale up a lot, but I have no numbers to back that up. Also, this isn't enterprise, for that I'd probably go and look at something else.

@chilts
Copy link
Owner

chilts commented Sep 20, 2019

Hmm, I just came across this again. I'm thinking about adding this functionality, but will probably only do it if there is some kind of demand for it. Anyone reading this, feel free to say so in the comments.

@florianbepunkt
Copy link

I would be interested in this

@florianbepunkt
Copy link

@chilts To be a bit more specific… I would like to know how to create a worker that consumes the queue (maybe with a given concurrency) as long as there are jobs

@chill-cod3r
Copy link

+1 to essentially allowing the ability to create a "consumer". supporting a "worker/consumer" style pattern that could automatically retrieve messages if they exist unacked would be a pretty awesome edition to this package.

@damianfrizzi
Copy link

+1 on what @florianbepunkt and @wolfejw86 mentioned.

@coderbuzz
Copy link

+1 it could be nice to have option to get messages in batch

Please take a look CloudFlare's Queue JavaScript APIs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants