apache / apache/pulsar

[Enhancement] Make Peek Messages API available for non-admin clients

Open
#24,051 0 comments 0 reactions 0 assignees View on GitHub
type/enhancement
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.

### Motivation

The current Peek Messages API is under the Admin API with `consume` permissions. We needed the ability for non-admin applications to peek the topic partitions.

### Solution

We propose adding a new endpoint to the Lookup API that leverages the internal implementation of the existing Peek Messages API. This enhancement will expose the Peek Messages functionality via the Lookup API, providing clients with an alternative access method. The internal logic of the Peek Messages API remains unchanged having minimal impact on existing functionalities.

### Alternatives

_No response_

### Anything else?

_No response_

### Are you willing to submit a PR?

- [x] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing Peek Messages API and the Lookup API entry points, then trace how the internal peek implementation handles topic partitions and permissions. Done means exposing the existing Peek Messages functionality through Lookup for non-admin clients while leaving the current Admin API behavior unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend-api-design, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.