Saturday, June 20, 2009

ServiceMix MessageExchange memory leak


Are you observing memory leak in JBI components deployed in ServiceMix? First place to check will be whether the message exchanges are closed properly.

In the InOut message exchanges, after receiving message from provider , consumer should set the status as DONE in the exchange and again send it to provider.

Note - just setting the status to DONE is not enough , it must be send back to provider, otherwise the message exchanges will not be properly closed and will result in a memory leak.

E.g.-
inOutexchange.setStatus(ExchangeStatus.DONE); context.getDeliveryChannel().send(inOutexchange);

No comments:

Post a Comment