Hi,

I guess you are using client.sendSync but not client.send, right?
If so, use client.send as much as possible to avoid the thread locked waiting for response(which in consequence no thread left to handle the later incoming request message).

Freeman
On 2010-2-25, at 下午12:59, subh wrote:


I have a simple flow as below

External message producer --> SMX JMS queue --> SMX Bean --> Camel router
--> SMX JMS Topic

The servicemix bean has the business logic to generate the outgoing message. To forward the message onto the next service, I am using ServiceMixClient.

I am using the ClientFactory to create a instance of the client.

ClientFactory factory = new
InitialContext().lookup(ClientFactory.DEFAULT_JNDI_NAME);
ServiceMixClient client = factory.createClient();

But after processing 1000 - 1500 messages, the Servicemix bean component
becomes very slow to respond. On checking the log, I see that the bean
thread count increases considerably and the expired threads are not garbage
collected.

Due to this, all incoming messages are getting blocked which forces us to restart the servicemix server. Once it is restarted, the processing becomes
very fast and we come to the same situation again in a day or so.

Am I doing something wrong by using the ServicemixClient inside the bean? If no, then what are the best practices for using the Servicemix client class.

Are there alternative ways to specify the "target service" from the SMX bean
endpoint?

Any hint or suggestion would be helpful.

I am using activemq5.3 and servicemix 3.3

Regards
Subh
--
View this message in context: 
http://old.nabble.com/ServicemixBean-thread-issue..-tp27714350p27714350.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.



--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com

Reply via email to