Skip to content

[feat][broker] Expose configuration to allow to read marker type messages#25171

Open
zymap wants to merge 3 commits intoapache:masterfrom
zymap:allow-to-rawReader-read-marker
Open

[feat][broker] Expose configuration to allow to read marker type messages#25171
zymap wants to merge 3 commits intoapache:masterfrom
zymap:allow-to-rawReader-read-marker

Conversation

@zymap
Copy link
Member

@zymap zymap commented Jan 21, 2026

Fixes #xyz

Main Issue: #xyz

PIP: #xyz

Motivation

When using RawReader to read messages, we want to read all the messages from the broker. And handle the marker type on the reader side.

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:

…ages

---

### Motivation

When using RawReader to read messages, we want to read all the messages
from the broker. And handle the marker type in the reader side.
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 21, 2026
return true;
}
for (String prefix : serviceConfig.getSubscriptionPrefixToSkipServerMarkerCheck()) {
if (name.startsWith(prefix)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If paired with "" (empty string), startsWith("") will allow all subscriptions to receive the marker.

If paired with "__", it might cause many internal subscriptions to receive the marker.

Here these two need to be ignored?

Copy link
Member Author

Choose a reason for hiding this comment

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

That is a configuration. If you configure the empty string or the "__", that is expected behavior, no? You need to understand that before configuring it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

@zymap zymap force-pushed the allow-to-rawReader-read-marker branch from d269cb7 to 5fdc131 Compare March 4, 2026 04:03
&& msgMetadata.hasTxnidLeastBits()) {
if (Markers.isTxnMarker(msgMetadata)) {
if (cursor == null || !cursor.getName().equals(Compactor.COMPACTION_SUBSCRIPTION)) {
if (!isMarkerAllowedDeliveryToSubscription(cursor)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can change the isMarkerAllowedDeliveryToSubscription to isMarkerSkippedDeliveryToSubscription, so we do not need ! anymore. The current logic is a little complex.

@hangc0276 hangc0276 added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages type/feature The PR added a new feature or issue requested a new feature area/broker doc-required Your PR changes impact docs and you will update later. ready-to-test release/4.1.4 and removed doc-not-needed Your PR changes do not impact docs labels Mar 6, 2026
@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 Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker doc-not-needed Your PR changes do not impact docs ready-to-test release/4.1.4 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages type/feature The PR added a new feature or issue requested a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants