Skip to content

breaking: nats-server 2.10.26 emits no responder if stream/consumer are not found #750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

aricart
Copy link
Member

@aricart aricart commented Mar 11, 2025

  • consumer.consume() will properly handle 503 if the stream or consumer are deleted. The status iterator will report properly.
  • breaking: consumer.fetch() will reject when iterating
  • breaking consumer.next(), which previously only returned null

The logic for reset when the consume fails due to missing heartbeats, will reduce the number of consumer infos done on non-bound consumers with a backoff that matches the expires. So the client will try quickly at first, but will settle to 30s by default tries.

@aricart aricart changed the title breaking: nats-server emits no responder if stream/consumer are not found breaking: nats-server 2.10.26 emits no responder if stream/consumer are not found Mar 11, 2025
@aricart aricart force-pushed the fix-no-responders branch from f6ae5d4 to c938c7e Compare March 11, 2025 22:42
Copy link
Contributor

@scottf scottf left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@caspervonb caspervonb left a comment

Choose a reason for hiding this comment

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

lgtm, same nit as nats-io/nats.js#221.

@@ -411,6 +420,17 @@ export class PullConsumerMessagesImpl extends QueuedIteratorImpl<JsMsg>
this.stop(error);
return;
}
} else if (code === 503 && description === "unknown") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't matching on 503 enough?

Copy link
Member Author

Choose a reason for hiding this comment

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

it is

@aricart aricart force-pushed the fix-no-responders branch from fca4bef to 5e441c8 Compare March 14, 2025 16:41
@aricart aricart merged commit fa4e1e5 into main Mar 14, 2025
3 checks passed
@aricart aricart deleted the fix-no-responders branch March 14, 2025 16:49
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