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

nsqd: messages defer time lost after restart #1107

Open
chyroc opened this issue Nov 30, 2018 · 4 comments
Open

nsqd: messages defer time lost after restart #1107

chyroc opened this issue Nov 30, 2018 · 4 comments

Comments

@chyroc
Copy link

chyroc commented Nov 30, 2018

  1. start nsq
  2. pub 100000 defer message(these message well store in file by go-diskqueue)
  3. stop nsq(lost defer-time info? because file only store message itself, not contain defer-time)
  4. start nsq again (all messages will restored from file and consume these message immediately)

also store defer-time to file?

@ploxiln
Copy link
Member

ploxiln commented Nov 30, 2018

Right - this is a known limitation of nsqd. It was not designed to be a robust scheduler. It can still be useful to build a system around - e.g. maybe the message has the time it should be processed, and the consumer can re-queue with appropriate delay if it gets it early. It works better for shorter defer times, like just a few minutes.

This is something that could theoretically be fixed, so I'll leave this open :)

@ploxiln ploxiln changed the title Restoring the defer message from a file will lose the defer-time of defer-message nsqd: messages defer time lost after restart Nov 30, 2018
@mreiferson mreiferson added the bug label Nov 30, 2018
@mreiferson mreiferson added question and removed bug labels Jan 2, 2019
@mreiferson
Copy link
Member

mreiferson commented Jan 2, 2019

Re-labeling this. Although it's technically an "issue", it could easily be treated as "working as intended" and not a "bug".

@mreiferson
Copy link
Member

see #1170, which would fix this

@qaqhy
Copy link

qaqhy commented Jun 20, 2023

fix: #1454 Fixed the issue of message delay time loss caused by nsqd restart

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

4 participants