apache / apache/pulsar

Broken subsequence of delayed messages

Open
#14,721 13 comments 0 reactions 1 assignee Claimed by @mattisonchao View on GitHub
help wanted type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

**Describe the bug**
Delayed messages to shared topic breaks subsequence of messages and delivered earlier than expected.

**To Reproduce**
Steps to reproduce the behavior:
1. Setup local standalone pulsar
2. Send messages every 20ms with the same deliverAt timestamp *10000ms* and with payload of millisecond when sending was started.
3. Log received messages payload.

I start receiving all messages after 9 seconds and it I have in log:

```
9001ms
1ms
21ms
41ms
61ms
81ms
...
8981ms
(here should be 9001ms)
9021ms
9041ms
...
```

**Expected behavior**
Two expectations:
1. Most important I expect first message to be received is message '1ms' and message '9001ms' after '8981ms'.
2. I expect start receiving messages after 10 seconds

Issue is reproduced in 2.8.0 and 2.9.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.