Skip to content

Conversation

@scottf
Copy link
Contributor

@scottf scottf commented Sep 24, 2025

No description provided.

@scottf scottf requested review from piotrpio and removed request for piotrpio September 24, 2025 19:45
NatsJetStreamMetaData meta = msg.metaData();
lastStreamSeq = meta.streamSequence();
lastConsumerSeq++;
subTrackJsMessage(msg); // for subclasses so they don't have to acquire the lock
Copy link
Contributor Author

Choose a reason for hiding this comment

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

trackJsMessage is called for every push or pull message. subTrackMessage added so if there is additional work to be done by a specific manager, they can do it within the lock. In this case, the pull manager needs to look for pin id

throw new IOException("Pinned not allowed with " + label);
}
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fetch and next cannot be pinned.

}

PullRequestOptions pro = PullRequestOptions.builder(fetchConsumeOptions.getMaxMessages())
PinnablePullRequestOptions pro = new PinnablePullRequestOptions(pmm.currentPinId,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not want to add pin id to the pull request that the user is allowed to manually make. So I made the PullRequestOptions extendable and made the PinnablePullRequestOptions to handled adding the pin.
I'm not loving this, but...

@scottf scottf changed the title Pinned and Prioritized support (2.12) Prioritized Consumer Support Sep 25, 2025
Copy link
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

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

LGTM

@scottf scottf merged commit 2fc7c6a into main Sep 25, 2025
5 checks passed
@scottf scottf deleted the prioritized branch September 25, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants