KayV
KayV

Reputation: 13835

What are the advantages of Java DSL over Spring DSL in Apache Camel?

I know we can use Java DSL and Spring DSL for working with routes in camel context. Can anybody tell me which one is more efficient? And What is the advantage of one over the other?

Upvotes: 0

Views: 1337

Answers (3)

Mobility
Mobility

Reputation: 3305

Personally, with help of some Configuration Management Platform (like disconf, https://github.com/knightliao/disconf), and some rules which defined in advance, I can change camel routes (add or remove) dynamically, without changing java code, or the xml.

It will be a little more complex using spring xml to do this. But using dsl, I just need to put configs in different if/else, which switched by configs.

Upvotes: 0

Souciance Eqdam Rashti
Souciance Eqdam Rashti

Reputation: 3191

You can use the java dsl for the actual Camel development and use spring or blueprint for your route setup or bean configuration, or bridging Camel to spring or Karaf.

Upvotes: 0

Christian Schneider
Christian Schneider

Reputation: 19606

I personally prefer the java dsl as the IDE completion helps very nicely with the DSL. The Java DSL also nicely follows when you do refactorings.

I often combine using a spring context and the Java DSL.

Upvotes: 4

Related Questions