Open gilday opened 4 months ago
/cc @Ladicek (smallrye), @cescoffier (reactive-messaging), @jmartisk (smallrye), @ozangunalp (reactive-messaging), @phillip-kruger (smallrye), @radcortez (smallrye)
Re-tested with Quarkus 3.11.1 and confirmed the issue still exists in that release.
Describe the bug
In an application that uses SmallRye Reactive Messaging, a channel consuming method may affect the contexts propagated to it using the
@CurrentThreadContext
annotation. However, when the channel consuming method is also annotated with@Blocking
, the configuration in the@CurrentThreadContext
annotation seems to be ignored.Expected behavior
The current context in the channel consuming method should be affected by the
@CurrentThreadContext
annotation.Actual behavior
The context is propagated to the channel consuming method as if the
@CurrentThreadContext
annotation were not present.How to Reproduce?
Small example application attached.
process
method throws theIllegalStateException
that indicates the request context is active.@Blocking
annotations from theprocess
method.IllegalStateException
is logged, because the CDI context has been cleared, so theRequestContextController
reference inprocess
may create a new request scope.quarkus-emitter-new-request-context.zip
Output of
uname -a
orver
Darwin pixee-mbp-gilday.localdomain 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64
Output of
java -version
openjdk version "21.0.1" 2023-10-17 LTS OpenJDK Runtime Environment Temurin-21.0.1+12 (build 21.0.1+12-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.1+12 (build 21.0.1+12-LTS, mixed mode)
Quarkus version or git rev
3.10.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae) Maven home: /Users/jgilday/.m2/wrapper/dists/apache-maven-3.9.6-bin/3311e1d4/apache-maven-3.9.6 Java version: 21.0.1, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "14.4.1", arch: "aarch64", family: "mac"
Additional information
No response