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?
Asked
Active
Viewed 1,396 times
3
-
http://camel.465427.n5.nabble.com/Confused-ModelCamelContext-Vs-CamelContext-and-RouteDefinition-Vs-Route-td5728129.html – Souciance Eqdam Rashti Nov 14 '16 at 07:42
-
By default I would say use CamelContext. It is used in most use cases. – Souciance Eqdam Rashti Nov 14 '16 at 07:43
1 Answers
3
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.

Glorfindel
- 21,988
- 13
- 81
- 109

Sagar
- 818
- 1
- 6
- 13