apache / apache/pulsar

Revisit TableView/Builder Listener Interface

Open
#23,158 2 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

Currently, the table view handler registration interface, `foreachListen and listen` needs to be called after the tableView.start(). However, some messages could be missed(not handled) if the handlers are registered too late.

The current handlers cannot differentiate existing and tailing messages. Some business logic might need to handle them differently.

### Solution

We probably need to revisit TableView/Builder interface to resolve the above issues correctly.

### Alternatives

Unknown

### Anything else?

N/A

### 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 reading the TableView/Builder interface and the current tableView.start(), foreachListen, and listen registration flow. Clarify an interface design that prevents messages from being missed and lets handlers distinguish existing messages from tailing messages; done when both behaviors are specified and covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.