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

rodrigo coelho edited comment on CAMEL-19342 at 5/12/23 8:34 AM:
-----------------------------------------------------------------

What i see so far is:
h3. Iteration 1

The method *DefaultModel.addRouteDefinitions* is called with the 2 route 
definitions:
{code:java}
Route(demo-test-0)[From[direct:demo-test-0] -> 
[OnException[[java.lang.Exception] -> []], 
LoadBalanceType[FailoverLoadBalancer, 
[To[http://localhost:8081/test?bridgeEndpoint=true&throwExceptionOnFailure=false]]]]]

Route(rd-demo-test-0)[From[rest:get:/demo0?matchOnUriPrefix=true] -> 
[To[direct:demo-test-0]]]{code}
The class attribute: *routeDefinitions* is _empty_
h3. Iteration 2

The method *DefaultModel.addRouteDefinitions* is called with the 2 route 
definitions:
{code:java}
Route(demo-test-1)[From[direct:demo-test-1] -> 
[OnException[[java.lang.Exception] -> []], 
LoadBalanceType[FailoverLoadBalancer, 
[To[http://localhost:8081/test?bridgeEndpoint=true&throwExceptionOnFailure=false]]]]]

Route(rd-demo-test-1)[From[rest:get:/demo1?matchOnUriPrefix=true] -> 
[To[direct:demo-test-1]]] {code}
The class attribute: *routeDefinitions* is *NOT* empty:
{code:java}
Route(rd-demo-test-0)[From[rest://get:/demo0?matchOnUriPrefix=true&routeId=rd-demo-test-0]
 -> [OnException[[java.lang.Exception] -> []], 
LoadBalanceType[FailoverLoadBalancer, 
[To[http://localhost:8081/test?bridgeEndpoint=true&throwExceptionOnFailure=false]]]]]
 {code}
I think the problem shoud be around here, because we see a REST route with 3 
elements:
1 - OnException

2- Load Balancer

3 - ToDefinition (where it fails)

*This route was added from the first iteration (rd-demo-test-0), so i think it 
fails to be removed by the end of first iteration.*

 


was (Author: coelhro):
What i see so far is:
h3. Iteration 1

The method *DefaultModel.addRouteDefinitions* is called with the 2 route 
definitions:
{code:java}
Route(demo-test-0)[From[direct:demo-test-0] -> 
[OnException[[java.lang.Exception] -> []], 
LoadBalanceType[FailoverLoadBalancer, 
[To[http://localhost:8081/test?bridgeEndpoint=true&throwExceptionOnFailure=false]]]]]

Route(rd-demo-test-0)[From[rest:get:/demo0?matchOnUriPrefix=true] -> 
[To[direct:demo-test-0]]]{code}
The class attribute: *routeDefinitions* is _empty_
h3. Iteration 2

The method *DefaultModel.addRouteDefinitions* is called with the 2 route 
definitions:
{code:java}
Route(demo-test-1)[From[direct:demo-test-1] -> 
[OnException[[java.lang.Exception] -> []], 
LoadBalanceType[FailoverLoadBalancer, 
[To[http://localhost:8081/test?bridgeEndpoint=true&throwExceptionOnFailure=false]]]]]

Route(rd-demo-test-1)[From[rest:get:/demo1?matchOnUriPrefix=true] -> 
[To[direct:demo-test-1]]] {code}
The class attribute: *routeDefinitions* is *NOT* empty:
{code:java}
Route(rd-demo-test-0)[From[rest://get:/demo0?matchOnUriPrefix=true&routeId=rd-demo-test-0]
 -> [OnException[[java.lang.Exception] -> []], 
LoadBalanceType[FailoverLoadBalancer, 
[To[http://localhost:8081/test?bridgeEndpoint=true&throwExceptionOnFailure=false]]]]]
 {code}
I think the problem shoud be around here, because we see a REST route with 3 
elements:
1 - OnException

2- Load Balancer

3 - ToDefinition (where it fails)

The routes got mixed somewhere, i will also continue my analysis. 

 

> Rest Inline Routes mixed with direct routes.
> --------------------------------------------
>
>                 Key: CAMEL-19342
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19342
>             Project: Camel
>          Issue Type: Bug
>          Components: came-core
>    Affects Versions: 3.20.4, 4.0-M3
>            Reporter: rodrigo coelho
>            Priority: Major
>
> Hello, 
> For more information please follow Zulip thread:
> [https://camel.zulipchat.com/#narrow/stream/257301-camel-spring-boot/topic/Inline.20Routes.20.28Default.20Model.29]
> Here is my code:
> [https://github.com/rodrigoserracoelho/rest-demo]
> Do let me know if you need more info.
> Thanks.
> BR,
> Rodrigo



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to