Bugs item #853941, was opened at 2003-12-04 10:02 Message generated for change (Comment added) made by ejort You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=853941&group_id=22866
Category: JBossMQ Group: v3.2 >Status: Closed >Resolution: Invalid Priority: 5 Submitted By: E.Sriram (esriram) >Assigned to: Adrian Brock (ejort) Summary: JMSTopic implementation Initial Comment: The implementation of the addMessage() method in the org.jboss.mq.server.JMSTopic class (performance perspective) can be improved. (JBoss 3.2.1) The method implementation is something like this 1. synchronize (Obtain a monitor lock) 2. Enumerate the listeners 3. Clone the message for each listener 4. Enqueue the cloned message to each listener's queue. Doing all these operations on the users thread is slowing down performance especially when messages are published to the Topic in multiple threads. I feel that the cloning and enumeration can be avoided (in the publisher's thread) and can be done asynchronously. The implementation should be something like this 1. synchronize (Obtain a monitor lock) 2. Enqueue the message 3. return Another thread can do the following 1. Clone the message for each listener 2. Enqueue the cloned message to each listener's queue. This way the cloning overhead can be removed from the publishers thread. Not sure if there are any issues in that methodology. thanks, E.Sriram ---------------------------------------------------------------------- >Comment By: Adrian Brock (ejort) Date: 2003-12-04 13:19 Message: Logged In: YES user_id=9459 If the client does not wait for addMessage to finish, it would not know whether it failed, e.g. Cannot persist the message due to system failure, you have a limit on number of messages in a subscription, the subscription or topic has been removed. This is especially important inside a transaction, see JMSDestinationManager.transact() If your client's aren't interested in failures, the best way to implement this processing would be to create a jbossmq interceptor that assigns the addMessage request to a threadpool. Regards, Adrian ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=853941&group_id=22866 ------------------------------------------------------- This SF.net email is sponsored by OSDN's Audience Survey. Help shape OSDN's sites and tell us what you think. Take this five minute survey and you could win a $250 Gift Certificate. http://www.wrgsurveys.com/2003/osdntech03.php?site=8 _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
