Skip to content
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

FEAT: services api queue option empty string means no queue, metadata is read-only #114

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

aricart
Copy link
Member

@aricart aricart commented Nov 5, 2024

breaking (services): the queue property now, if set to an empty string, means that the service/endpoint/group will not be in a queue. Clients that specifically assign queue names should experience no changes. Clients that didn't specify a value for the property (so the property was undefined) should also not experience a change and should see their service/endpoint/group use the q group. If explicitly set to an empty string ``, the service will NOT be part of a queue.

breaking (services): The metadata configuration specified when creating the service is now stored read-only. Any edit on the internal copy will result in a TypeError as the metadata object is frozen.

…means that the service/endpoint/group will not be in a queue. Clients that specifically assign queue names should experience no changes. And clients that didn't specify a value for the property (so the property was undefined) should also not experience a change and should see their service/endpoint/group use the `q` group. If explicetly set to an empty string ``, the service will NOT be part of a queue.

breaking(services): the metadata configuration specified when creating the service is now stored read-only, any type of edit on the internal copy will result in a `TypeError` as the metdata object is frozen.

Signed-off-by: Alberto Ricart <[email protected]>
Copy link

@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

@aricart aricart merged commit 69eb332 into main Nov 5, 2024
31 checks passed
@aricart aricart deleted the no-queue-services branch November 5, 2024 20:39
@TomKaltz
Copy link

@aricart can you explain the behavior when queue is set to an empty string? Does this mean that all instances of the service will get the request and respond then the client will only take the first answer?

@aricart
Copy link
Member Author

aricart commented Dec 22, 2024

See https://github.com/nats-io/nats.js/tree/main/core#queue-groups

Empty is no queue group. Having a queue is what you want...

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