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

design question: consume = lose, or ack on consume? #1

Open
Dieterbe opened this issue Aug 30, 2015 · 1 comment
Open

design question: consume = lose, or ack on consume? #1

Dieterbe opened this issue Aug 30, 2015 · 1 comment

Comments

@Dieterbe
Copy link

in nsqd/diskqueue.go , any data consumed from the diskqueue is considered dealth with, the reader is moved, the data becomes programmatically inaccessible and gets garbage collected from disk when we move to the next file.

if data read from diskqueue could not be properly processed, it's up to the user of diskqueue to handle this, often just requeueing the same data to the head of the queue.

While this works for nsqd, I think maybe the behavior for this WAL project should be different. Basically use ack's so that readers can confirm when they want to move to the next position.
this should be more gentle on the hard drive, perform better, and don't introduce needless reordering, (which seems useful for a bunch of applications, even with no ordering guarantees, consumers that have to re-order data in a window will have to do less work)

@mreiferson
Copy link
Owner

This isn't implemented yet but the design includes "retention windows" that can be defined in bytes.

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

No branches or pull requests

2 participants