Equivalent of Vertx RoutingContext.put() for storing variables? #25513
Unanswered
javadevmtl
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So I have been using Vertx since almost version 1. I have extensively built my platform on Vertx and now looking to using Quarkus a bit more. I have less experience with Jax-Rs a/RestEasy.
Quarkus is quite opinionated compared to Vertx and trying to find ways to fit all the un-opinionated stuff back into Quarkus...
One thing I do with Vertx is when someone access a web resource endpoint such as /hello/world/
In Vertx I can access the RoutingContext and put() a variable in the context and then access it downstream on chained handlers (filters).
I do this mostly for storing variables and things I want to pass to a Loging filter.
So I know there quarkus-vertx-reactive-routes and I can access the RC there directly. But wondering what would be the equivalent on the new quarkus-resteasy-reactive extension.
I know I can use Request and Response context and filters. But which of the context is the correct one to store/share a variable and read it down stream on a filter that execute after the endpoint is called?
Edit: I see for filters we can use: ContainerRequestContext.setProperty and getProperty, but how do you access it on the actuall resource?
Beta Was this translation helpful? Give feedback.
All reactions