[Bug] deliverAfter not work
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Version
pulsar server- 2.8.1
pulsar client - 2.8.1
### Minimal reproduce step
producer.newMessage()
.value(json)
.deliverAfter(2, TimeUnit.SECONDS)
.send();
### What did you expect to see?
when i set 2 seconds,i want to see the send time :<1666854402823>, recieve time <1666854404823>
### What did you see instead?
when i set 2 seconds,i want to see the send time :<1666854402823>, recieve time <1666854402847>
### Anything else?
The question is when i set the value of deliverAfter to 1 seconds or 2 seconds, the function is not work, unless Greater than or equal to 3 seconds.
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start by reproducing the producer.newMessage().deliverAfter(2, TimeUnit.SECONDS).send() case against Pulsar server and client 2.8.1, then compare the send and receive timestamps. Check the same behavior with one- and three-second delays to isolate the threshold. Done means the configured delay is respected for the reported cases, not only for delays of three seconds or more.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 44/100