MuleESB / Apache Camel Interview Questions
What is an Endpoint in Camel and how does the URI format work (scheme:path?options)?
An Endpoint is a communication channel that abstracts a specific transport behind a uniform interface. Every endpoint is identified by a URI: scheme:path?option1=value1. The scheme identifies the Component factory, the path is the component-specific address, and options configure behaviour as query parameters.
// File: poll dir every 2s, leave files untouched
from("file:/data/input?noop=true&delay=2000")
// JMS: produce with client acknowledgement
.to("jms:queue:invoices?acknowledgementModeName=CLIENT_ACKNOWLEDGE")
// HTTP: outbound call with 30s connect timeout
.to("http://api.example.com/products?bridgeEndpoint=true&connectTimeout=30000");
// Kafka: consume from earliest offset
from("kafka:payments?brokers=localhost:9092&autoOffsetReset=earliest");
// Timer: fire every 10s starting immediately
from("timer:heartbeat?period=10000&delay=0");An endpoint can be a Consumer (in from()) or Producer (in to()). The timer: component is consumer-only; log: is producer-only; jms: and kafka: support both. Endpoints are cached by the CamelContext — the same URI reuses the same instance. Property placeholders ({{key}}) keep environment-specific values out of code.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
