Receive asynchronous message
Receive asynchronous messages and storing them in DB:
- all essential things are solved in AsynchInMessageRoute (trace header recognition, create message, persist to DB, exception handling)
- use AsynchRouteBuilder to implement inbound asynchronous message
creates uniform design of asynchronous routes (processes) with the following processing steps (low-level approach):
- settings the name of source service and operation. This information (based name conventions) are necessary to resolving of start endpoint to process asynchronous part.
- execution of general validation (check required values). If a validation error occurs then OpenHub framework will throw ValidationIntegrationException or org.apache.camel.ValidationException (from Apache Camel).
- redirection to "to(AsynchConstants.URI_ASYNCH_IN_MSG)"
- using AsynchResponseProcessor - checks if created message was successfully persisted or if some error did not occur. Then correct response will be produced.
Hereby accepting an asynchronous message ends when it is persisted in internal database for further processing and OpenHub framework sends confirmation to external system that message was adopted.