Repository navigation
fix: Enable jetstream endpoint to resolve stream from subject and add error logs - #63
Merged
Merged
Conversation
TiyaBelay
force-pushed
the
ENGAG-3754/resolve-stream-from-subject
branch
from
October 7, 2026 18:55
6f61edd to
1cdeaf6
Compare
gabeodess
reviewed
Oct 7, 2026
TiyaBelay
force-pushed
the
ENGAG-3754/resolve-stream-from-subject
branch
from
October 7, 2026 20:57
3fb3333 to
aedb08d
Compare
gabeodess
reviewed
Oct 7, 2026
gabeodess
reviewed
Oct 7, 2026
gabeodess
reviewed
Oct 7, 2026
TiyaBelay
force-pushed
the
ENGAG-3754/resolve-stream-from-subject
branch
from
October 7, 2026 22:25
c7eeb1b to
06e88c7
Compare
gabeodess
approved these changes
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Previously, when booting a subscriber with a subject and without an explicit stream, messages are not received and no errors were logged. This was because the errors for InvalidStream (when stream is nil) were raised in nats-pure but was not handled in Leopard and just disappeared in the worker pool. By adding the stream lookup and error logs, we can resolve a stream from a subject when creating a new subscriber in rails and have logged errors displayed when subscriber is booted.
Local Testing
Before this change, we only saw the below when stream is not provided, whereas consumer info displayed 2 unprocessed messages:
With this change and stream is not provided, stream is resolved from the subject:
With this change, when there's a typo with the subject and it doesn't belong to an existing stream: