If I have a Camel route that has implemented a Content based Routing EIP(Choice operation). How do I test it. I'm new to Camel. So, I'm unsure how to do it. I have mentioned a sample code below that has to be tested.
public void configure() throws Exception
{
onException(Exception.class).handled(true).bean(ErrorHandler.class).stop();
from("{{input}}?concurrentConsumers=10")
.routeId("Actions")
.choice()
.when().simple("${header.Action} == ${type:status1}")
.bean(Class, "method1")
.when().simple("${header.Action} == ${type:status2}")
.bean(Class, "method2")
.when().simple("${header.Action} == ${type:status3}")
.bean(Class, "method3")
.otherwise()
.bean(Class, "method4")
.end();
}
}
Thanks, Gautham
Aucun commentaire:
Enregistrer un commentaire