I have a single queue marked both as a

I have a single queue marked both as a producer and a consumer queue, attached to the same worker. The worker takes input from the queue and produces output to the same queue until the task is done. What I observe is, the task runs for couple of iterations and stops running.
3 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
omar4289
omar42892y ago
You would probably get better results with a cron job every 1 minute. I heard there is a limit of 100 retries after which the message is permanently deleted from the queue. Do you maybe fall into this case?
Mad
MadOP2y ago
I am calling an API that does a token-based pagination, the queue stores the next token and the worker calls the API + Stores data to DB until all the data is retrieved
1. Call API, store data to DB, push next token to queue
2. Call API using the next token, store data to DB, push next token to queue
..
100. Call API, store data to DB. Next token is NULL. Stop.
1. Call API, store data to DB, push next token to queue
2. Call API using the next token, store data to DB, push next token to queue
..
100. Call API, store data to DB. Next token is NULL. Stop.
that's what the worker does

Did you find this page helpful?