-
Notifications
You must be signed in to change notification settings - Fork 438
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
[FS][RFC] Change to FIFO queue #171
Comments
I am more than happy to merge this If you find a way to read&remove something from the beginning of the file and write to the end (or vice verse). Without reading the whole file into the memory of course. I failed to do so. |
In general, I wouldn't suggest using |
@makasim ah didn't realise you tried, I imagine I will likely run into similar issues but will take a look when I get chance. Not using in prod, but am using in dev and would be nice for it to perform same way as prod :) |
I don't think it is easier. When I develop this transport I tried to keep it as useful for developers as possible since it is mostly used by them in dev. having a lot of files to deal with does not make things better. I have a feeling that the logic, in the end, will be much more complicated than the current one. Everything is okay If only we accept it LIFO nature. Other drivers perform mostly as FIFO. |
@jenkoian my bad. I replied to this actually : #170 (comment) |
Feel free to reopen if you find a solution to this. |
I've created a PR that resolves this issue. There's also a problem with requeuing messages when the Filesystem driver is LIFO where the requeued message is placed at the end of the file, resulting in the message being immediately redelivered. This makes it impossible to get to the rest of the messages in the queue. Changing the read order to FIFO fixes this issue by allowing new messages to be appended to the end of a file while consuming messages from the start of the file. |
If you're happy to go with this but don't have time to work on it, I'm happy to contribute PR but want to get your thoughts first.
Most other queues suppose FIFO by default e.g.:
http://beanstalkc.readthedocs.io/en/latest/tutorial.html#job-priorities
https://aws.amazon.com/sqs/faqs/
For the Filesystem driver, it is using a LIFO approach. I was wondering if we could change this to a FIFO approach (read from the beginning of the file rather than the end) or to make it configurable?
The text was updated successfully, but these errors were encountered: