Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between CamelContext and ModelCamelContext

Tags:

apache-camel

What is the difference between above two? Most of the documentation on getting started with camel has examples with CamelContext but I also see ModelCamelContext used in places. When should I use one versus other?

like image 372
Bobby S Avatar asked Apr 28 '26 14:04

Bobby S


1 Answers

Refer to this link.

The basic difference is CamelContext is an SPI (Service Provider Interface) and ModelCamelContext is an API for the known implementations [DefaultCamelContext, OsgiCamelContext, SpringCamelContext etc..], So if you are writing your own CamelContext implementation you must implement CamelContext and if suppose you want to access some of modeling data of any of the known implementations of CamelContext like SpringCamelContext then you must use the ModelCamelContext reference.

Difference between SPI and API?

like image 182
Sagar Avatar answered May 01 '26 03:05

Sagar