Skip to content

[feat][pip]PIP-415: Support getting message ID by Index - #24220

Merged
liangyepianzhou merged 10 commits into
apache:masterfrom
liangyepianzhou:pip-415
May 19, 2025
Merged

liangyepianzhou merged 10 commits into
apache:masterfrom
liangyepianzhou:pip-415

Conversation

@liangyepianzhou

@liangyepianzhou liangyepianzhou commented Apr 27, 2025 •

Copy link
Copy Markdown
Contributor

Motivation

we can now obtain the offset of a message by its message id:

  1. Get the message by id using get-message-by-id cmd
  2. Get the index of the message using Message.getIndex()

But we cannot obtain the message id by offset. Then we need to add a new API to get the message id by offset.

Modifications

Add a new http API to retrieve the message ID by offset.
We propose to add a new API to retrieve the message ID by offset, enabling us to cache the mapping between message ID and offset.
This will allow us to use offsets for seek and acknowledgment operations when consuming messages through the standardized API.

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:

@github-actions github-actions Bot added PIP doc-required Your PR changes impact docs and you will update later. labels Apr 27, 2025
@liangyepianzhou liangyepianzhou self-assigned this Apr 27, 2025
@liangyepianzhou liangyepianzhou changed the title PIP-415: Support getting message ID by offset [feat][pip]PIP-415: Support getting message ID by offset Apr 27, 2025
@liangyepianzhou
liangyepianzhou marked this pull request as ready for review April 27, 2025 03:29
@github-actions github-actions Bot added doc-not-needed Your PR changes do not impact docs and removed doc-required Your PR changes impact docs and you will update later. labels Apr 27, 2025
Comment thread pip/pip-415.md Resolved
Comment thread pip/pip-415.md Resolved
Comment thread pip/pip-415.md Resolved
@liangyepianzhou
liangyepianzhou requested review from BewareMyPower, StevenLuMT, lhotari and poorbarcode and removed request for StevenLuMT May 6, 2025 03:42
@liangyepianzhou
liangyepianzhou force-pushed the pip-415 branch 2 times, most recently from cb9a150 to 71155c8 Compare May 14, 2025 02:48
@liangyepianzhou liangyepianzhou changed the title [feat][pip]PIP-415: Support getting message ID by offset [feat][pip]PIP-415: Support getting message ID by Index May 14, 2025
Comment thread pip/pip-415.md Resolved
Comment thread pip/pip-415.md Resolved
…may point to the same MessageId (entry-level granularity).
Comment thread pip/pip-415.md Resolved
Comment thread pip/pip-415.md Resolved
@liangyepianzhou
liangyepianzhou merged commit aa3ce89 into apache:master May 19, 2025
@liangyepianzhou
liangyepianzhou deleted the pip-415 branch May 29, 2025 02:26
liangyepianzhou added a commit that referenced this pull request Jun 23, 2025
PIP:#24220

### Motivation
 we can now obtain the offset of a message by its message id:

1. Get the message by id using `get-message-by-id` cmd
2. Get the index of the message using `Message.getIndex()`

But we cannot obtain the message id by offset. Then we need to add a new API to get the message id by offset.


### Modifications

Add a new http API to retrieve the message ID by offset.
We propose to add a new API to retrieve the message ID by offset, enabling us to cache the mapping between message ID and offset.
This will allow us to use offsets for seek and acknowledgment operations when consuming messages through the standardized API.
KannarFr pushed a commit to CleverCloud/pulsar that referenced this pull request Sep 22, 2025
### Motivation
 we can now obtain the offset of a message by its message id:

1. Get the message by id using `get-message-by-id` cmd
2. Get the index of the message using `Message.getIndex()`

But we cannot obtain the message id by offset. Then we need to add a new API to get the message id by offset.


### Modifications

Add a new http API to retrieve the message ID by offset.
We propose to add a new API to retrieve the message ID by offset, enabling us to cache the mapping between message ID and offset.
This will allow us to use offsets for seek and acknowledgment operations when consuming messages through the standardized API.
KannarFr pushed a commit to CleverCloud/pulsar that referenced this pull request Sep 22, 2025
)

PIP:apache#24220

### Motivation
 we can now obtain the offset of a message by its message id:

1. Get the message by id using `get-message-by-id` cmd
2. Get the index of the message using `Message.getIndex()`

But we cannot obtain the message id by offset. Then we need to add a new API to get the message id by offset.


### Modifications

Add a new http API to retrieve the message ID by offset.
We propose to add a new API to retrieve the message ID by offset, enabling us to cache the mapping between message ID and offset.
This will allow us to use offsets for seek and acknowledgment operations when consuming messages through the standardized API.
walkinggo pushed a commit to walkinggo/pulsar that referenced this pull request Oct 8, 2025
### Motivation
 we can now obtain the offset of a message by its message id:

1. Get the message by id using `get-message-by-id` cmd
2. Get the index of the message using `Message.getIndex()`

But we cannot obtain the message id by offset. Then we need to add a new API to get the message id by offset.


### Modifications

Add a new http API to retrieve the message ID by offset.
We propose to add a new API to retrieve the message ID by offset, enabling us to cache the mapping between message ID and offset.
This will allow us to use offsets for seek and acknowledgment operations when consuming messages through the standardized API.
walkinggo pushed a commit to walkinggo/pulsar that referenced this pull request Oct 8, 2025
)

PIP:apache#24220

### Motivation
 we can now obtain the offset of a message by its message id:

1. Get the message by id using `get-message-by-id` cmd
2. Get the index of the message using `Message.getIndex()`

But we cannot obtain the message id by offset. Then we need to add a new API to get the message id by offset.


### Modifications

Add a new http API to retrieve the message ID by offset.
We propose to add a new API to retrieve the message ID by offset, enabling us to cache the mapping between message ID and offset.
This will allow us to use offsets for seek and acknowledgment operations when consuming messages through the standardized API.
liangyepianzhou added a commit that referenced this pull request Nov 12, 2025
PIP:#24220

 we can now obtain the offset of a message by its message id:

1. Get the message by id using `get-message-by-id` cmd
2. Get the index of the message using `Message.getIndex()`

But we cannot obtain the message id by offset. Then we need to add a new API to get the message id by offset.

Add a new http API to retrieve the message ID by offset.
We propose to add a new API to retrieve the message ID by offset, enabling us to cache the mapping between message ID and offset.
This will allow us to use offsets for seek and acknowledgment operations when consuming messages through the standardized API.

(cherry picked from commit ed28c21)
manas-ctds pushed a commit to datastax/pulsar that referenced this pull request Nov 13, 2025
)

PIP:apache#24220

 we can now obtain the offset of a message by its message id:

1. Get the message by id using `get-message-by-id` cmd
2. Get the index of the message using `Message.getIndex()`

But we cannot obtain the message id by offset. Then we need to add a new API to get the message id by offset.

Add a new http API to retrieve the message ID by offset.
We propose to add a new API to retrieve the message ID by offset, enabling us to cache the mapping between message ID and offset.
This will allow us to use offsets for seek and acknowledgment operations when consuming messages through the standardized API.

(cherry picked from commit ed28c21)
(cherry picked from commit 8350352)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Nov 14, 2025
)

PIP:apache#24220

 we can now obtain the offset of a message by its message id:

1. Get the message by id using `get-message-by-id` cmd
2. Get the index of the message using `Message.getIndex()`

But we cannot obtain the message id by offset. Then we need to add a new API to get the message id by offset.

Add a new http API to retrieve the message ID by offset.
We propose to add a new API to retrieve the message ID by offset, enabling us to cache the mapping between message ID and offset.
This will allow us to use offsets for seek and acknowledgment operations when consuming messages through the standardized API.

(cherry picked from commit ed28c21)
(cherry picked from commit 8350352)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs PIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants