Currently we have a search endpoint which has to do a lot of processing of results before returning to the caller. It’s starting to take far too much time. So, I’m trying to figure out a solution and wondering if message MQ stuff can help.
In short, our endpoint fetches search results very quickly, but post processing to add details like user costs is very expensive. I’d like to find a way to return the results right away and then send the post-processing to another service which returns the results to the browser when they are ready.
After reading over the messaging MQ stuff I’m wondering if this is the best direction.
My assumption is that I could fetch my results, send those off to be processed via message MQ service and return the un modified results right away. Then, within the MQ service I could use Reply To to send the return data to our browser messaging service. This would then allow the browser UX to update the results as necessary.
Is this a valid approach or am I understanding this incorrectly? Or maybe there is a better approach?