Bobby S
Bobby S

Reputation: 43

Difference between CamelContext and ModelCamelContext

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?

Upvotes: 3

Views: 1703

Answers (1)

Sagar
Sagar

Reputation: 838

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?

Upvotes: 3

Related Questions