What exactly is Apache Camel?

I don't understand what exactly Camel does.

If you could give in 101 words an introduction to Camel:

  • What exactly is it?
  • How does it interact with an application written in Java?
  • Is it something that goes together with the server?
  • Is it an independent program?
  • Please explain what Camel is.


    If you have 5 to 10 minutes, I generally recommend people to read this Integration with Apache Camel by Jonathan Anstey. It's a well written piece which gives a brief introduction to and overview of some of Camel's concepts, and it implements a use case with code samples. In it, Jonathan writes:

    Apache Camel is an open source Java framework that focuses on making integration easier and more accessible to developers. It does this by providing:

  • concrete implementations of all the widely used Enterprise Integration Patterns (EIPs)
  • connectivity to a great variety of transports and APIs
  • easy to use Domain Specific Languages (DSLs) to wire EIPs and transports together
  • There is also a free chapter of Camel in Action which introduces Camel in the first chapter. Jonathan is a co-author on that book with me.


    My take to describe this in a more accessible way...

    In order to understand what Apache Camel is, you need to understand what Enterprise Integration Patterns are.

    Let's start with what we presumably already know: The Singleton pattern, the Factory pattern, etc; They are merely ways of organizing your solution to the problem, but they are not solutions themselves. These patterns were analyzed and extracted for the rest of us by the Gang of Four, when they published their book: Design Patterns. They saved some of us tremendous effort in thinking of how to best structure our code.

    Much like the Gang of Four, Gregor Hohpe and Bobby Woolf authored the book Enterprise Integration Patterns (EIP) in which they propose and document a set of new patterns and blueprints for how we could best design large component-based systems, where components can be running on the same process or in a different machine.

    They basically propose that we structure our system to be message oriented -- where components communicate with each others using messages as inputs and outputs and absolutely nothing else. They show us a complete set of patterns that we may choose from and implement in our different components that will together form the whole system.

    So what is Apache Camel?

    Apache Camel offers you the interfaces for the EIPs, the base objects, commonly needed implementations, debugging tools, a configuration system, and many other helpers which will save you a ton of time when you want to implement your solution to follow the EIPs.

    Take MVC. MVC is pretty simple in theory and we could implement it without any framework help. But good MVC frameworks provide us with the structure ready-to-use and have gone the extra mile and thought out all the other "side" things you need when you create a large MVC project and that's why we use them most of the time.

    That's exactly what Apache Camel is for EIPs. It's a complete production-ready framework for people who want to implement their solution to follow the EIPs.


    Creating a project description should not be complicated.

    I say:

    Apache Camel is messaging technology glue with routing. It joins together messaging start and end points allowing the transference of messages from different sources to different destinations. For example: JMS -> JSON, HTTP -> JMS or funneling FTP -> JMS, HTTP -> JMS, JSON -> JMS

    Wikipedia says:

    Apache Camel is a rule-based routing and mediation engine which provides a Java object based implementation of the Enterprise Integration Patterns using an API (or declarative Java Domain Specific Language) to configure routing and mediation rules. The domain specific language means that Apache Camel can support type-safe smart completion of routing rules in your IDE using regular Java code without huge amounts of XML configuration files; though XML configuration inside Spring is also supported.

    See? That wasn't hard was it?

    链接地址: http://www.djcxy.com/p/9368.html

    上一篇: 文件:“无主清单属性”

    下一篇: Apache Camel究竟是什么?