jentrata / jentrata-msh

Jentrata - Message Handler Service
jentrara.org
Other
19 stars 57 forks source link

Jentrata ActiveTaskModule is entering into indefinite wait state #70

Closed Abhishekvangala closed 4 years ago

Abhishekvangala commented 4 years ago

Hi Team,

We are using Jentrata for POC and experimenting various combination of settings, In one of the condition we have registered an Inbox messages fire event handler which sends message to a mock endpoint and Inbox task collector with setting wait-for-list as true,

After few messages we ended up in indefinite state due to below code
if (isWaitForList) { monitor.waitForEmpty(); }

Also we could not see any messages reaching mock endpoint if there are any pending ActiveThreads currently being processed.

We are using org.apache.commons.httpclient.HttpClient to send messages to mock endpoint on any messagereceived event

aaronwalker commented 4 years ago

@Abhishekvangala Are you able to provide details of your setup. Jentrata version (git-sha) JDK version etc. Also can you provide any logs and a thread dump.

Also what protocol are you trying to use AS2 or EbMS?

Is the goal your trying to achieve is push a message payload to a backend when it received? The are actually other options for doing this. I recently add support for integrating apache camel within Jentrata directly. See https://github.com/jentrata/jentrata-msh/blob/master/Dist/src/main/deploy/example-ebms.xml.example as an example. To test this setup you can rename this file to example-ebms.xml in the deploy directory and restart Jentrata. I've haven't really documented this feature but an happy to answer any questions. I have this feature deployed in many production deployments integration with services such AWS SQS, ActiveMQ etc

Abhishekvangala commented 4 years ago

Hi @aaronwalker, We identified the issues is with one of the custom class written to consume incoming events, a thread is waiting for the response and due to property wait-for-list true, Inbox collector is waiting for thread to be released and Jentrata is entering stale state, we have put a timeout on custom code , if we do not receive response in stipulated time, it generates a timeout exception and thread will be released. This ticket can be closed, Thank you for the support