I have an app that among other things takes a list of objects and stores them in a db. Since this doesn't need to be done synchronously, I wrote it so that the list was iterated over and each item put into a JMS queue where it was consumed by another thread. It works fine, but the problem I have is that my producer seems to wait until each object is processed by the consumer. I was specifically using JMS in order to return to the app after sending off the objects. So my question is: Should my producer be running in it's own thread in order to have it perform the way I was expecting or am I possibly doing something else wrong.
I have avoided using code samples as I hope that this can be answered at a high level.