JMS Acknowledgement

Discussions

General J2EE: JMS Acknowledgement

  1. JMS Acknowledgement (2 messages)

    Hi,

    I though I was pretty up to speed on JMS - but now I'm not so sure :-)

    I have a plain java client, posting JMS messages to a JMS queue on a Weblogic 7.1 SP2 server. A pool of MDB's process messages on this queue.

    It was my understanding that posting to a JMS queue was asynchronous.

    However, it appears that when I post a message, control is not returned to the client until the message has been consumed by the MDB. I thought the client would get control back once the message had been persisted to the queue (a SQL Server 2000 D/B in this case).

    My client is performing like a dog at the moment. It's taking up to half a second to post each message. And only one MDB seems to be in use, although I have 40 in the pool.

    For information - if I undeploy the application, I can fire off 80,000 messages to the server in about 10 minutes. If the application is deployed, this goes up to around 3 hours.

    I'd would have expected the client to complete its processing in around the same time, and for the messages to get queued up on the server. This does not seem to be happening - the messages are consumed faster than they are queued.

    Any ideas gratefully accepted.

    Cheers,
    Rick

    Threaded Messages (2)

  2. JMS Acknowledgement[ Go to top ]

    It's impossible for your client to block until the onMessage() method in your MDB completes since MDB's are asynchronous by definition. Something else might be going on.

    Raffi
  3. JMS Acknowledgement[ Go to top ]

    Thanks for the confirmation Raffi. The code looks OK - so I think there must be another problem somewhere. I'll investigate further.

    Cheers,
    Rick