Switch case in Apache Camel
Is there a construct in Apache Camel (in Java DSL) similar to Java switch-case? For example: from( incomingRoute ) .choice() .when( simple( "${body.getType} == '" + TYPE.A.name() + "'" ) ) .to( A_Endpoint ) .when( simple( "${body.getType} == '" + TYPE.B.name() + "'" ) ) .to( B_Endpoint ) .when( simple( "${body.getType} == '" + TYPE.C.name() + "'" ) ) .to( C_Endpoint ) .otherwise() .to( errorEndpoint ); Can be translated into something else more similar to switch? I mean that I do not want to use simple predicates, only value of type of body element. Or is my approach completely wrong? (That co
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.