You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the client offers no API for capturing calling thread context when invocations are turned into async on RX ones. ClientRequestFilters are first executed on executing thread.
Proposal:
New component that can be registered into ClientBuilder with roughly following API:
These providers would be looked up and invoked by AsyncInvoker or before turning an invocation into RxInvoker, to allow for capturing additional calling thread context into request context.
The text was updated successfully, but these errors were encountered:
pdudits
changed the title
API for for async context propagation in Client API
No API for for async context propagation in Client API
Sep 20, 2019
RxInvoker has an RxProvider spi that basically makes it hard to make sure the AsyncContextProvider would run in a non-executor thread. Mostly, the RxProvider runs the SyncInvoker in a thread given by the executor service, so it is late already. An option is to run the AsyncContextProvider as soon as the async()/rx() is executed. But the request may never be actually invoked, so it does not sound right to execute that at the point.
For AsyncInvoker this can be done
For default RxInvoker this can be done, too.
@pdudits What do you think the right solution for RxInvoker would be?
Currently the client offers no API for capturing calling thread context when invocations are turned into async on RX ones. ClientRequestFilters are first executed on executing thread.
Proposal:
New component that can be registered into
ClientBuilder
with roughly following API:These providers would be looked up and invoked by
AsyncInvoker
or before turning an invocation intoRxInvoker
, to allow for capturing additional calling thread context into request context.The text was updated successfully, but these errors were encountered: