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

Make cancellation handler for async requests configurable in quarkus-rest #45141

Closed
us766 opened this issue Dec 16, 2024 · 5 comments · Fixed by #45144
Closed

Make cancellation handler for async requests configurable in quarkus-rest #45141

us766 opened this issue Dec 16, 2024 · 5 comments · Fixed by #45144
Milestone

Comments

@us766
Copy link

us766 commented Dec 16, 2024

Description

Based on this PR #41710 in Quarkus 3.13, cancellation handler for async requests has been added for quarkus-rest extension. With this change when client cancels a request, the processing pipeline receives a cancellation event. This change is breaking some parts of existing REST APIs.

Considering that issue #41776 describes a similar behavior for Multi subscription on gRPC calls and remains open, could these changes in behavior be configurable, or could an annotation be introduced to enable the previous behavior?

Preserving the old behavior by making these changes configurable would allow security updates and platform version bumping without forcing changes on the logic for adopting the new behavior (even though it is the correct one).

Copy link

quarkus-bot bot commented Dec 16, 2024

/cc @radcortez (config)

@geoand
Copy link
Contributor

geoand commented Dec 16, 2024

I think we could have some special annotation that control the behavior.

@cescoffier WDYT?

@cescoffier
Copy link
Member

Yes, but cancellation should be the default.

@geoand
Copy link
Contributor

geoand commented Dec 16, 2024

Definitely

geoand added a commit to geoand/quarkus that referenced this issue Dec 16, 2024
This annotation can be placed on REST methods
that return a single result async type
and allows the user to configure whether the
subscription should be cancelled if the
connection is closed before the result is available

Closes: quarkusio#45141
@geoand
Copy link
Contributor

geoand commented Dec 16, 2024

#45144

geoand added a commit to geoand/quarkus that referenced this issue Dec 16, 2024
This annotation can be placed on REST methods
that return a single result async type
and allows the user to configure whether the
subscription should be cancelled if the
connection is closed before the result is available

Closes: quarkusio#45141
geoand added a commit that referenced this issue Dec 16, 2024
Introduce @Cancellable annotation for Quarkus REST
@quarkus-bot quarkus-bot bot added this to the 3.18 - main milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants