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

Annotation @RunOnVirtualThread doesn't work on class level for Websockets Next Client #45027

Closed
andreiyusupau opened this issue Dec 10, 2024 · 3 comments
Assignees
Labels
area/virtual-threads Issue related to Java's Virtual Threads area/websockets env/windows Impacts Windows machines kind/bug Something isn't working

Comments

@andreiyusupau
Copy link

Describe the bug

@RunOnVirtualThread annotation doesn't work on class level for class annotated with @WebSocketClient.

Expected behavior

I expect that @RunOnVirtualThread would apply to all methods inside websocket client (as it works for controllers https://quarkus.io/blog/virtual-threads-2/).

Actual behavior

No response

How to Reproduce?

//doesn't work, handlers are executed on worker threads
@RunOnVirtualThread
@WebSocketClient(path = "/ws")
public class ExampleWebsocketClient {

    //works fine
    @RunOnVirtualThread
    @OnTextMessage
    void onMessage(String message, WebSocketClientConnection connection) {
        
    }
}

Output of uname -a or ver

Microsoft Windows [Version 10.0.22631.4460]

Output of java -version

Amazon Corretto 21.0.5

Quarkus version or git rev

3.17.2

Build tool (ie. output of mvnw --version or gradlew --version)

gradle 8.10.2

Additional information

No response

@andreiyusupau andreiyusupau added the kind/bug Something isn't working label Dec 10, 2024
@quarkus-bot quarkus-bot bot added area/virtual-threads Issue related to Java's Virtual Threads env/windows Impacts Windows machines labels Dec 10, 2024
Copy link

quarkus-bot bot commented Dec 10, 2024

/cc @cescoffier (virtual-threads), @ozangunalp (virtual-threads)

@ozangunalp
Copy link
Contributor

I see that it was fixed in #44925 both for server and client.

@mkouba
Copy link
Contributor

mkouba commented Dec 11, 2024

I see that it was fixed in #44925 both for server and client.

Yes, it was. Although it only tests the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/virtual-threads Issue related to Java's Virtual Threads area/websockets env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants