I am working on a Spring boot application and need to read request header in a RxJava thread, but injecting HttpServletRequest doesn't work because of a new thread. Passing header from current thread to new thread is unwanted.
code flow: Controller -> Service -> for each order -> (this code spawns new threads) Observable.just(invokeOrderService(orderNumber))
-> fetch request header something like httpRequest.getHeader("isApp")
I am completely clueless about approach. All I need is header info to be available in the newly created threads.