Camel supports the Message Endpoint pattern using the Endpoint interface. Endpoints are usually created by a Component and Endpoints are usually referred to in the DSL via their URIs.
Example:
file://inbox?sorter=#bean:mySpecialFileSorter
Is it helpful?
Add CommentView Comments
Ques 7. What are various components in apache camel? Which ones have you used?
Apache camel provides us with a number of components. These components make interacting create endpoints with which a system can interact with other external systems. For example using an ActiveMQ component we expose an ActiveMQ endpoint for interaction with external system. There are more than 100 components provided by Apache Camel. Some of them are FTP, JMX, Webservices, HTTP. Apache camel also allows users to create custom components. It also provides different connector components to interact with Cloud services (AWS/Azure etc).
Is it helpful?
Add CommentView Comments
Ques 8. How to make database calls using Apache Camel?
You can call database using apache camel component.
Maven dependency:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.15</version>
</dependency>
Coding example:
from(”debezium-mysql:dbz-test-1?offsetStorageFileName=/usr/offset-file-1.dat&databaseHostName=localhost&databaseUser=debezium&databasePassword=dbz&databaseServerName=my-app-connector&databaseHistoryFileName=/usr/history-file-1.dat”).log(”Event received from Debezium : ${body}”)
Is it helpful?
Add CommentView Comments
Ques 9. Have you used Apache Camel with Spring?
Yes. Have integrated Apache Camel with Spring. It helps in utilizing features like Spring Dependency injection, Datasource and Transaction management.
Maven dependencies to be used:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>2.13.0</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>2.13.0</version>
</dependency>
Is it helpful?
Add CommentView Comments
Ques 10. How to expose a REST webservice endpoint using Apache Camel?
You can expose the REST webservice API endpoint using Apache camel (JAX-RS or CXFRS).