Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
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

invisibletime in options-object #22

Open
groenlid opened this issue Sep 30, 2016 · 2 comments
Open

invisibletime in options-object #22

groenlid opened this issue Sep 30, 2016 · 2 comments

Comments

@groenlid
Copy link

In my code, I'm currently trying to create a new queue if necessary and start processing messages using the rsmq-worker package.
The worker is doing time-consuming work so I want the timeout and invisibletime to be a high number.

const timeToProcessMessage = 600000
const worker = new RSMQWorker(queueName, {
  timeout: timeToProcessMessage,
  invisibletime: timeToProcessMessage
})
worker.start()

This command seem to create the queue, but with the wrong invisible-value. It seems to set the default 30sek value instead of the value in the options-object.

@mpneuried
Copy link
Owner

I will try to have a look at it tomorrow...

@mpneuried
Copy link
Owner

After my tests it's working well.
But i think you missed something in the docs.
The unit of the timeout is ms and for invisibletime it's s.
So you're using 10 minutes timeout and 6,94 days invisibility.

The Setting timeout is used inside rsmq-worker to define a time a single process/messgae is allowed to run.
The invisibletime configuration is the time a message will be invisible for all workers after it was once received. This is required to prevent a message to be processed by mutliple workers in parallel.

I hope this clears your case.

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

No branches or pull requests

2 participants