You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2019/01/30 10:02:00 UTC
[jira] [Created] (CAMEL-13141) camel-api - Add API for advicing
routes
Claus Ibsen created CAMEL-13141:
-----------------------------------
Summary: camel-api - Add API for advicing routes
Key: CAMEL-13141
URL: https://issues.apache.org/jira/browse/CAMEL-13141
Project: Camel
Issue Type: New Feature
Reporter: Claus Ibsen
Fix For: 3.0.0
We should likely add a nicer API for testing camel routes with the adviceWith functionality. Today you have to use a RouteReifier from camel-core. We should make a new API in camel-api and make it with a nicer name so its easier to understand and use.
{code}
RouteReifier.adviceWith(context.getRouteDefinitions().get(0), context, new RouteBuilder() {
@Override
public void configure() throws Exception {
// intercept sending to mock:foo and do something else
interceptSendToEndpoint("mock:foo")
.skipSendToOriginalEndpoint()
.to("log:foo")
.to("mock:advised");
}
});
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)