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

Add disable affinity feature #167

Merged
merged 1 commit into from Oct 25, 2023
Merged

Add disable affinity feature #167

merged 1 commit into from Oct 25, 2023

Conversation

nimf
Copy link
Collaborator

@nimf nimf commented Oct 24, 2023

Before this PR there was no option to ignore affinity key in the message. But in some cases upper layer may want that for some calls.

This PR allows temporarily disabling affinity either via call option:

stub.withOption(GcpManagedChannel.DISABLE_AFFINITY_KEY, true).someRpcMethod(...)

or via context:

Context
    .current()
    .withValue(GcpManagedChannel.DISABLE_AFFINITY_CTX_KEY, true)
    .run(() -> {
        stub.someRpcMethod(...)
    })

@nimf nimf requested a review from mohanli-ml October 24, 2023 18:20
@nimf nimf merged commit c36e089 into master Oct 25, 2023
2 checks passed
@nimf
Copy link
Collaborator Author

nimf commented Oct 25, 2023

/cc @arpan14

@nimf nimf deleted the disable-affinity branch October 27, 2023 17:54
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.

None yet

2 participants