[ 
https://issues.apache.org/jira/browse/CAMEL-17675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17532121#comment-17532121
 ] 

Remo Loetscher commented on CAMEL-17675:
----------------------------------------

Hi Claus,
{quote}I made a mistake when rest-dsl was created that you could embed a route 
inside it
{quote}
What a pitty this code was removed. We used this "feature" to easy create a 
{{rulebased forwarding/blocking route}} for rest calls, like:
{code:java}
restDefinition.route().streamCaching()
  .doTry()
    .choice()
    .when(ex -> securityCheckService
            .checkForwardingAllowed(ex.getIn().getHeader("xyz", String.class), 
ref))
      .log(LoggingLevel.INFO, ref, "message id '${id}' forwarded to " + toRoute)
      .to("destination...")
    .otherwise()
      .log(LoggingLevel.DEBUG, ref, "Forwarding interrupted: ${body}")
      ...
  .endDoTry()
  .doCatch(HttpOperationFailedException.class)
  ...
  .end(); {code}
This was quite convenient.

> Rest DSL - Removed inlined routes
> ---------------------------------
>
>                 Key: CAMEL-17675
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17675
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.16.0
>
>
> In the Rest DSL you can inline a route but that was a mistake.
> I made a mistake when rest-dsl was created that you could embed a route 
> inside it
> that is bad, instead its better as it was a facade to a route which you link 
> via direct.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to