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

Dispatch Vert.x event bus consumer events in correct context #45683

Merged

Conversation

ozangunalp
Copy link
Contributor

@ozangunalp ozangunalp commented Jan 17, 2025

Fixes #38061

Event bus consumer handlers are called on duplicated contexts created from the context that registered the consumer.
When dispatching over blocking or VT threads we do not need to re-create a duplicated context.
(Hence there is no need to jump on the context.runOnContext to dispatch on VT executor.)

@ozangunalp ozangunalp force-pushed the vertx_event_bus_consumer_context branch from f3607a8 to c110062 Compare January 17, 2025 14:47
Copy link
Contributor

@brunobat brunobat left a comment

Choose a reason for hiding this comment

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

The solution looks really elegant.
Thanks @ozangunalp

This comment has been minimized.

@geoand geoand force-pushed the vertx_event_bus_consumer_context branch from c110062 to 1ea7599 Compare January 18, 2025 06:16
@geoand geoand added triage/waiting-for-ci Ready to merge when CI successfully finishes and removed triage/waiting-for-ci Ready to merge when CI successfully finishes labels Jan 18, 2025
Copy link

quarkus-bot bot commented Jan 18, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 1ea7599.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ Native Tests - HTTP

📦 integration-tests/rest-client-reactive

io.quarkus.it.rest.client.BasicTestIT.shouldCreateClientSpans - History

  • expected: <1> but was: <2> - org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: expected: <1> but was: <2>
	at io.quarkus.it.rest.client.BasicTest.shouldCreateClientSpans(BasicTest.java:216)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:789)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

@cescoffier cescoffier merged commit 9104473 into quarkusio:main Jan 19, 2025
52 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.19 - main milestone Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenTelemetry: context of sender not active in consumer
4 participants