Skip to content

Conversation

@Technoboy-
Copy link
Contributor

@Technoboy- Technoboy- commented Jul 16, 2025

Motivation

Currently, if users consume messages from a topic using the Pulsar client CLI, they can't have an option to consume messages from a specific time. This PIP proposes to add startTimestamp and endTimestamp options to the Pulsar client CLI to allow users to consume messages within a specific time range.

Modifications

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository:

@Technoboy- Technoboy- added PIP doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. labels Jul 16, 2025
@Technoboy- Technoboy- self-assigned this Jul 16, 2025
@github-actions github-actions bot added doc-required Your PR changes impact docs and you will update later. doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. and removed doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. doc-required Your PR changes impact docs and you will update later. labels Jul 16, 2025
@Technoboy- Technoboy- changed the title [improve][pip] PIP-435: Add startTimestamp and endTimestamp for consuming message in client consume cli [improve][pip] PIP-435: Add startTimestamp and endTimestamp for consuming message in client cli Jul 16, 2025
@BewareMyPower BewareMyPower added this to the 4.1.0 milestone Jul 17, 2025
@BewareMyPower BewareMyPower requested a review from Copilot July 17, 2025 02:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a design proposal for new startTimestamp and endTimestamp options to the Pulsar client CLI to allow users to consume messages within a specific time range.

  • Introduces CLI flags and describes seek-and-stop logic in the design doc
  • Outlines placeholders for compatibility, scope, and alternatives
  • References mailing list threads for discussion
Comments suppressed due to low confidence (6)

pip/pip-435.md:13

  • Populate the 'In Scope' section with specific items that will be implemented in this PIP, or remove the heading if no additional scope details are needed.
## In Scope

pip/pip-435.md:16

  • Populate the 'Out of Scope' section to clarify what is intentionally excluded from this enhancement or remove the heading.
## Out of Scope

pip/pip-435.md:32

  • Describe any backward or forward compatibility implications of adding these flags or remove the section if none exist.
# Backward & Forward Compatibility

pip/pip-435.md:35

  • List possible alternatives considered for this design or remove the section if not needed.
# Alternatives

pip/pip-435.md:41

  • Provide the URL for the voting thread or remove this placeholder if the link is not yet available.
* Mailing List voting thread: 

pip/pip-435.md:30

  • Add tests to validate that the consumer correctly seeks to startTimestamp and stops at endTimestamp during message consumption.
Then use `consumer.seek(startTimestamp)` to consume the messages from the specified start timestamp, and check the `publishTime` of the received msg, if larger than the `endTimestamp`, stop the consume process.

@Technoboy- Technoboy- changed the title [improve][pip] PIP-435: Add startTimestamp and endTimestamp for consuming message in client cli [improve][pip] PIP-435: Add startTimestamp and endTimestamp for consuming messages in client cli Jul 18, 2025
@dao-jun dao-jun merged commit 12a4ca2 into apache:master Jul 19, 2025
20 checks passed
@Technoboy- Technoboy- deleted the master branch July 23, 2025 01:16
KannarFr pushed a commit to CleverCloud/pulsar that referenced this pull request Sep 22, 2025
…ming messages in client cli (apache#24524)

Co-authored-by: Yunze Xu <xyzinfernity@163.com>
walkinggo pushed a commit to walkinggo/pulsar that referenced this pull request Oct 8, 2025
…ming messages in client cli (apache#24524)

Co-authored-by: Yunze Xu <xyzinfernity@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. PIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants