• Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS Producer question

 
Manny Garcia
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy,

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.

Regards,

Manny
 
Mahesh Trikannad
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sending a message using JMS, is asynchronous. So, you should NOT be seeing the behaviour you have described.
 
Manny Garcia
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good to have that confirmation. I will dig deeper into this then.

Regards,

Manny
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!