...
- class name should ends with suffix Route
- adhere to the rules of naming conventions for route IDs (use getInRouteId(), getOutRouteId() or getRouteId() functions) and URIs
- use parent class org.openhubframework.openhub.api.route.AbstractBasicRoute
- use @CamelConfiguration and define unique Spring bean name for this route - this annotation allows initialization by Spring auto-scanning funcionality. Don't forget to check auto-scanning configuration.
- define operation name
Tip |
---|
You can use RouteBeanNameGenerator for automatic bean names generation. |
Unit tests
Each route implementation must have corresponding unit tests, at least one successful scenario.
- create unit test that extends AbstractTest or AbstractDbTest if database support is needed (both classes are from test module) if database support is needed
- you can use Spring test profiles - see org.openhubframework.openhub.modules.TestProfiles
- use @ActiveRoutes annotation that defines which routes will be activated for specific unit test
...
Tip |
---|
You can use RouteBeanNameGenerator for automatic bean names generationSee How to write unit test? for more details about writing unit tests. |
New synchronous route implementation
...
- throttling - route for processing asynchronnous input requests contains throttling by default. You should add it to all synchronnous routes
- external call - each call to external system should go through "external call" funcionality
- route authorization is made by Camel policy, see Camel Security
- Guaranteed guaranteed message processing order
- checking of obsolete messages via object ID
- look at components for use - msg-funnel, asynch-child, ...
- define senders CloseableHttpComponentsMessageSender for calling external system via Spring Web Service (SOAP messages). Add configuration into /META-INF/sp_ws_wsdl.xml
...