How to create ServletRequest programmatically targeting a different response URL?

185 views Asked by At

To give you a background, upon receiving a request we want to extract the payload along with other information like request URI, query parameters, etc. and put it as a message in a Message Queue. Another service will then pick messages and invoke Katharsis so that the proper Controller will process the request. This is to create an asynchronous processing mechanism.

Now to invoke Katharsis manually we need to implement KatharsisInvokerContext which requires to create HttpServletRequest and HSResponse. However, since this is happening in the server we want the response goes back the the original requester.

Does anyone know how to do this or whether we are doing it wrong way? I'm open to suggestions.

We are using Spring Boot, Katharsis-core 2.0.1 and Katharsis-spring 2.0.3.

0

There are 0 answers