Suppose I have a REST end point. UI sends some parameters to this REST end point which are required for a stored procedure to run properly. Since this stored procedure is going to take a long time to run, I am planning to use JMS and put this step to JMS Queue.
Now, I am not very clear about what to put in the JMS Queue here. Usually, whatever hello world examples of JMS I've seen, they are sending a small message using Sender and Receiver consumes this message.
But in the case of a Stored procedure call, I am wondering what exactly should be forwarded to ApacheMQ ? If I understood correctly, the Sender in this case would be sending the call to the stored procedure to JMS Queue in the form of a String, and then Receiver will grab this string message(which is a call to stored procedure) from the Queue immediately (provided I've only one item in the Queue) and Receiver will start processing it? So, by receiver processing I mean the receiver will communicate with the database and process the query. Is this how it works basically? Thanks