|
From: Patrick Y. <kc...@ce...> - 2004-05-29 03:11:03
|
Hi, Have you written a Hermes client to receive messages? If you implement onMessage() method in MessageListener, Hermes client will create a polling thread to poll for received message periodically. The polled message will then be passed to you via the onMessage() method. To cut down the loading of these polling activities, you can tune the polling interval in msh_client.properties.xml. Or you can use other message delivery modes to eliminate polling activities altogether. Please see the documentation for more information. Thanks. Regards, -Patrick Simen Andre Skjervum wrote: >Hello, > >I have a test environment running Hermes (ebms2) MSH v.pre-1.0.0.0. I >have made a servlet using msh as part of an ordering system with >a supplier. I could need some advice on how to better control the msh. > >When using the Servlet Heavily I encounter some serious performance >issue with the mysql db ( I use mysql as a msh database ). >The performance issue is due to some queries running from the msh >like: >SELECT MessageStore.c_messageid, MessageInfo.c_conversationid, >MessageStore.c_filename, MessageStore.c_sequencenumber FROM >MessageStore, MessageInfo WHERE >MessageStore.c_messageid=MessageInfo.c_messageid AND >MessageStore.c_sequencenumber>=-9998 AND MessageStore.c_cpaid='*' AND >MessageStore.c_conversationid='*' AND MessageStore.c_service='*' AND >MessageStore.c_action='*' AND MessageStore.c_state>=-7 AND >MessageStore.c_state<=-5 > >Looking in to msh.log I see loads of this: >2004-04-30 11:03:18,165 INFO [http8080-Processor2]: Process command: Get message (32) >2004-04-30 11:03:18,166 DEBUG [http8080-Processor2]: => MessageServiceHandler.processCommand >2004-04-30 11:03:18,166 DEBUG [http8080-Processor2]: => MessageServiceHandler.getMessage >2004-04-30 11:03:18,166 DEBUG [http8080-Processor2]: => MessageServiceHandler.getNextUndeliveredMessage >2004-04-30 11:03:18,167 DEBUG [http8080-Processor2]: => MessageServer.getUndeliveredMessages >2004-04-30 11:03:18,167 DEBUG [http8080-Processor2]: => DbConnectionPool.getConnection >2004-04-30 11:03:18,167 DEBUG [http8080-Processor2]: <= DbConnectionPool.getConnection >2004-04-30 11:03:18,196 DEBUG [http8080-Processor2]: <= MessageServer.getUndeliveredMessages >2004-04-30 11:03:18,196 DEBUG [http8080-Processor2]: <= MessageServiceHandler.getNextUndeliveredMessage with no message >2004-04-30 11:03:18,196 DEBUG [http8080-Processor2]: => Transaction.commit (txID: #1530) >2004-04-30 11:03:18,197 DEBUG [http8080-Processor2]: => DbConnectionPool.freeConnection >2004-04-30 11:03:18,197 DEBUG [http8080-Processor2]: <= DbConnectionPool.freeConnection >2004-04-30 11:03:18,197 DEBUG [http8080-Processor2]: <= Transaction.commit >2004-04-30 11:03:18,198 DEBUG [http8080-Processor2]: <= MessageServiceHandler.getMessage >2004-04-30 11:03:18,198 DEBUG [http8080-Processor2]: <= MessageServiceHandler.processCommand > >These keeps running on even after I stop using the servlet. >When I stop-start tomcat they go away until I start using the servlet >again. Obviously(?) I need to find a way to tell the >MessageServiceHandler to stop polling for messages, but I can't seem >to get at it. Can anyone advice me how to solve this? > > > |