0
votes

I have a Message Producer running on one JVM that puts in messages in a JMS Queue .I have a Message Consumer which implements Message-Driven-Bean and MessageListener interface that listens to this queue.This Message consumer is on a different JVM.

The producer puts in messages in the queue properly.But the MDB is not able to pop out messages from queue.The weird thing is that when I restart my Message Consumer , all the messages in the queue are popped out by the Message Consumer at once.After this,no matter how many messages producer puts in the queue ,the Message Consumer does not pop them out. What could be the reason??

The application server I am using is JBOSS4.0.5.GA.

Thanks

1

1 Answers

0
votes

Please provide more details. From what you have provided:

  • is your consumer running and waiting for messages ? (inside some sort of while loop or a blocking call)
  • you can set prefetch size for your consumer to be 1 in your jms connection settings so that it fetches only 1 (or whatever number) message from the queue.