Stopping mode

OpenHub allows to switch to stopping mode where no new asynchronous and/or synchronous requests will be processed, only current asynchronous messages will be finished (messages in states IN_QUEUE, PROCESSING and WAITING_FOR_RES).

Synchronous requests which should reject incoming calls are recognized by input URI. This URI is identified by regular expression defined in the property ohf.uri.inputPattern.

If OpenHub rejects incoming request then exception org.openhubframework.openhub.api.exception.StoppingException is thrown.

Technical implementation:

When route starts with specified input URI then HandleMessagePolicy is created. When node is stopped then this policy throws an exception.

For getting information about route type (input, output etc.) use RoudeDefinitionService. Default implementation of this service searchs route type in all implementations RouteTypeResolver.

This functionality is available for users in admin GUI.