Use of Message Listener/MDB
1 posts in topic
Flat View  Flat View

Posted By:   Sud_S
Posted On:   Saturday, March 30, 2002 01:02 PM

Question 1:
What happens in case of asynchronous processing of messages if one or more message arrives on Queue while the onMsg method is still processing the previous message?This is when I am using a simple java class to comsume messages.


Question 2:
I have a scenario where I have to pick an Xml Message from Queue and send it to an SMTP server.It may happen that server is down and message can't be sent.Can I roll back the transaction in this case and recieve it back later when the server is up?Can MDB be used for this processing?

Re: Use of Message Listener/MDB

Posted By:   Nicholas_Whitehead  
Posted On:   Sunday, March 31, 2002 09:13 AM


Answer 1: When you set up an asynchronous listener using the onMessage method, a second message will ot be processed until the first call to onMessqe is complete. Accordingly, you will never process more than one message at a time.

Answer 2: The easiest way to this will be to use client acknowledgement. Do acknowledge the message until you have verified that the SMTP server is active and that you have successfully sent the message.


About | Sitemap | Contact