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

[Broker] Expose lastConsumedTimestamp and lastAckedTimestamp to subscription stats #6046

Closed
sijie opened this issue Jan 14, 2020 · 1 comment
Assignees
Labels
area/broker type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Comments

@sijie
Copy link
Member

sijie commented Jan 14, 2020

Motivation

Currently, msgBacklog measures the number of messages that a subscription has not consumed and it is an estimated value. It is hard to tell the difference between a backlog estimate being wrong and messages being otherwise stuck. It would be great to expose lastConsumedTimestamp and lastAckedTimestamp to measure the activities of dispatch and acknowledge. So people can use these timestamps to tell if acknowledge and consumption are happening.

These two metrics provide a lag metric similar to Kafka.

Related Tasks: #5721

@sijie sijie added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/broker component/stats labels Jan 14, 2020
zymap added a commit to zymap/pulsar that referenced this issue Jan 14, 2020
---

Master Issue: apache#6046

*Motivation*

Make people can use the timestamp to tell if acknowledge and consumption
are happening.

*Modifications*

- Add lastConsumedTimestamp and lastAckedTimestamp to consume stats

*Verify this change*

- Pass the test `testConsumerStatsLastTimestamp`
tuteng pushed a commit that referenced this issue Feb 4, 2020
…#6051)

---

Master Issue: #6046

*Motivation*

Make people can use the timestamp to tell if acknowledge and consumption
are happening.

*Modifications*

- Add lastConsumedTimestamp and lastAckedTimestamp to consume stats

*Verify this change*

- Pass the test `testConsumerStatsLastTimestamp`
@tuteng
Copy link
Member

tuteng commented Feb 4, 2020

This has been solved #6051

@tuteng tuteng closed this as completed Feb 4, 2020
tuteng pushed a commit to AmateurEvents/pulsar that referenced this issue Feb 23, 2020
…apache#6051)

---

Master Issue: apache#6046

*Motivation*

Make people can use the timestamp to tell if acknowledge and consumption
are happening.

*Modifications*

- Add lastConsumedTimestamp and lastAckedTimestamp to consume stats

*Verify this change*

- Pass the test `testConsumerStatsLastTimestamp`
tuteng pushed a commit to AmateurEvents/pulsar that referenced this issue Mar 21, 2020
…apache#6051)

---

Master Issue: apache#6046

*Motivation*

Make people can use the timestamp to tell if acknowledge and consumption
are happening.

*Modifications*

- Add lastConsumedTimestamp and lastAckedTimestamp to consume stats

*Verify this change*

- Pass the test `testConsumerStatsLastTimestamp`

(cherry picked from commit 5728977)
tuteng pushed a commit that referenced this issue Apr 13, 2020
…#6051)

---

Master Issue: #6046

*Motivation*

Make people can use the timestamp to tell if acknowledge and consumption
are happening.

*Modifications*

- Add lastConsumedTimestamp and lastAckedTimestamp to consume stats

*Verify this change*

- Pass the test `testConsumerStatsLastTimestamp`

(cherry picked from commit 5728977)
jiazhai pushed a commit to jiazhai/pulsar that referenced this issue May 18, 2020
…apache#6051)

---

Master Issue: apache#6046

*Motivation*

Make people can use the timestamp to tell if acknowledge and consumption
are happening.

*Modifications*

- Add lastConsumedTimestamp and lastAckedTimestamp to consume stats

*Verify this change*

- Pass the test `testConsumerStatsLastTimestamp`

(cherry picked from commit 5728977)
huangdx0726 pushed a commit to huangdx0726/pulsar that referenced this issue Aug 24, 2020
…apache#6051)

---

Master Issue: apache#6046

*Motivation*

Make people can use the timestamp to tell if acknowledge and consumption
are happening.

*Modifications*

- Add lastConsumedTimestamp and lastAckedTimestamp to consume stats

*Verify this change*

- Pass the test `testConsumerStatsLastTimestamp`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/broker type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

No branches or pull requests

3 participants