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

no CDI request context in Kafka consumer #46153

Open
gavinking opened this issue Feb 8, 2025 · 4 comments
Open

no CDI request context in Kafka consumer #46153

gavinking opened this issue Feb 8, 2025 · 4 comments
Labels
area/arc Issue related to ARC (dependency injection) area/kafka kind/enhancement New feature or request

Comments

@gavinking
Copy link

Description

I just received this report via the Hibernate issue tracker:

https://hibernate.atlassian.net/browse/HHH-19109

Apparently the CDI request context is not available from a Kafka consumer.

But a Kafka consumer is, I suppose, 100% analogous to a JMS MessageListener, and so it should be quite clear from the CDI spec that the intent is for such callbacks to have a request context.

Bit in case there's any doubt: the intention of the CDI spec is that there is always an active context for the @RequestScoped scope type in any scope where application program logic is executing. The explicit list of scenarios in the Javadoc is a floor, not a ceiling.

Implementation ideas

No response

@gavinking gavinking added the kind/enhancement New feature or request label Feb 8, 2025
@quarkus-bot quarkus-bot bot added area/arc Issue related to ARC (dependency injection) area/kafka labels Feb 8, 2025
Copy link

quarkus-bot bot commented Feb 8, 2025

/cc @Ladicek (arc), @alesj (kafka), @cescoffier (kafka), @manovotn (arc), @mkouba (arc), @ozangunalp (kafka)

@alesj
Copy link
Contributor

alesj commented Feb 8, 2025

@gavinking
Copy link
Author

@alesj Not sure. That issue describes something "random", whereas I understand that my user was describing something that's just not supported.

@alesj
Copy link
Contributor

alesj commented Feb 8, 2025

Well, @ozangunalp is aware of this issue, and he can tell you more ... what is or isn't supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) area/kafka kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants