Hi Experts,
As Stuck threads are unavoidable and concerns for our current OSB projects we were planning of some work around in design principles . Service Callout is one of the cases that causes the thread to be held until the response comes in case if sync call. So, wanted to minimize the use of service callout directly to the third-party systems with help of routing activity which much more efficient for holding the thread.
The below blogs describe nicely how the internal OSB thread works and can get stuck in case of Service Callout.
https://blog.darwin-it.nl/2016/10/osb-thread-handling-recommendations.html
https://blogs.oracle.com/reynolds/following-the-thread-in-osb
Though there could be other reasons as well for weblogic stuck thread.
Could you please suggest if the below design approach will be useful and feasible to overcome the threads stuck in case of service callout .
Here we use a proxy service with Routing activity to invoke main third-party business services and invoke this proxy internally from other proxy services (with service callout).
So we create below resources:
1> MasterRoutePS is a Proxy service which simply routes to the actual Business Service based on the content from caller Proxy Service.It could be soap-header where the business service name is mentioned and the soap-body could be actual payload of the business service[Purpose to use thread safe route activity only for the business services]
2>MasterRouteBS is a business service which points to MasterRoutePS.It is configured with ReadTimeout and connection timeout settings which will simply help caller Proxy service to get timed out in case actual business service taking longer time than expected. This timing out will prevent caller proxy services to stuck in case of some unforeseen issues (https://genericparallel.com/blog/2014/01/why-osb-read-just-doesnt-time-out/ As it is internal osb calls so it have less chances to be hanged/stuck.
3>Caller Proxy services which invokes MasterRouteBS which in turn invokes MasterRoutePS and invokes actual business service with help of routing activity.
So, when a Caller Proxy wants to invoke Business Service (Bs1) it does not directly service callout to Bs1 it does as below
Current AS-IS flow:
Caller Proxy (ServiceCallout)-> Bs1
To-be Flow:
Caller Proxy-(ServiceCallout)-> MasterRouteBS(ReadTimeout,ConnectionTimeout is set)--> MasterRoutePS-(Routing)->BS1
So would you please guide if the approach will be thread safe and effective solution to our current issue.We understand that we are increasing the hops to overcome the service callout stuck thread issue.

