Related differences

Ques 11. How did you execute JUnit test cases for Apache camel?

Using CamelSpringTestSupport.

  1. <dependency>  
  2.     <groupId>org.apache.camel</groupId>  
  3.     <artifactId>camel-test-spring</artifactId>  
  4.     <version>2.13.0</version>  
  5.     <scope>test</scope>  
  6. </dependency>  
 

Is it helpful? Add Comment View Comments
 

Ques 12. How are exception handled using Apache Camel?

Exception can be handled using the <try> <catch> block, <OnException> block or the <errorHandler> block.
The errorHandler is used to handle any uncaught Exception that gets thrown during the routing and processing of a message. Conversely, onException is used to handle specific Exception types when they are thrown.

Is it helpful? Add Comment View Comments
 

Ques 13. What is Redelivery policy in Apache Camel?

A redelivery policy defines rules when Camel Error Handler perform redelivery attempts. For example you can setup rules that state how many times to try redelivery, and the delay in between attempts, and so forth. 

Example: 
onException(...) 
.redeliveryPolicyRef(”testRedeliveryPolicyProfile”)

Is it helpful? Add Comment View Comments
 

Ques 14. What is CamelContext?

The CamelContext represents a single Camel routing rulebase. We use the CamelContext in a similar way to the Spring ApplicationContext. public interface CamelContext extends SuspendableService, RuntimeConfiguration. Interface used to represent the context used to configure routes and the policies to use during message exchanges between endpoints.

Is it helpful? Add Comment View Comments
 

Ques 15. What is RouterContext?

It is now possible to define routes outside <camelContext/> which you do in a new <routeContext/> tag. The routes defined in <routeContext/> can be reused by multiple <camelContext/>. However its only the definition which is reused. At runtime each CamelContext will create its own instance of the route based on the definition.

Is it helpful? Add Comment View Comments
 

Most helpful rated by users: