Giriş
Açıklaması şöyle. Enterprise Integration Patterns (EIP) için bileşenler sunar.
CamelContext
Açıklaması şöyle. Enterprise Integration Patterns (EIP) için bileşenler sunar.
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.
Bunun hikayesi şöyle
The story goes that Camel was based on a conversation between Gregor Hophe and James Strachan. Gregor wrote the integration bible Enterprise Integration Patterns, a book that gives you the designs for common integration tasks as a set of patterns…you know, so you don’t need to reinvent the same architecture patterns.James, an open source developer and the founder of Groovy (the language) and Gregor were talking at a conference and James thought it would be a cracking idea to build reusable Java implementations of these patterns… you know, so that you don’t have to keep on writing the same code when you need to do stuff! Apache Camel was born from this conversation as a set of libraries that implement integration patterns.
Camel ve Diğer Altyapılarla Birlikte Kullanılabilir mi?
Açıklaması şöyle. Cevap evet hem de çok kolaylıkla
Apache Camel provides support for bean binding and seamless integration with popular frameworks such as CDI, Spring, Blueprint, and Guice.
Açıklaması şöyle
Apache Camel supports Bean Binding and seamless integration with popular frameworks such as CDI and Spring. Camel also has extensive support for unit testing your routes.
Camel ve SpringBoot yazısına taşıdım
Apache Camel picks up messages using 'Camel based Component' of the 'from' system and drops them using the 'Camel based Component' of the 'to' system. A message may route to multiple systems, but everywhere they have to go through 'Camel based Components' to travel between 'Apache Camel's underlying transport mechanism' and the system.
Component Endpoints Yani URI
Apache Camel uses URIs to work directly with any kind of transport or messaging models such as HTTP, ActiveMQ, JMS, JBI, SCA, MINA or CXF, as well as pluggable Components and Data Format options. Apache Camel is a small library with minimal dependencies for easy embedding in any Java application. Apache Camel lets you work with the same API regardless of which kind of transport is used — so learn the API once, and you can interact with all the Components provided out-of-box.
Routing
Açıklaması şöyle
Camel empowers you to define routing and mediation rules in various domain-specific languages (DSL, such as Java, XML, Groovy, Kotlin, and YAML). This means you get smart completion of routing rules in your IDE, whether in a Java or XML editor.
Data Format
Açıklaması şöyle
Camel supports around 50 data formats, allowing to translate messages in multiple formats and with support from industry-standard formats from finance, telco, healthcare, and more.
Bazı Önemli Bileşenler
Çok fazla component var. Bazıları şöyle
Content Base Routing
Choice ve When yazısına taşıdım
Exchange
Exchange Kavramı yazısına taşıdım
Processors
Processors Kavramı yazısına taşıdım
Exception
Exception Kavramı yazısına taşıdım
Kullanım
1. CamelContext yaratılır
2. CamelContext'e RouterBuilder yardımıyla Route nesneleri eklenir
3. Route kuralları DSL ile yazılır. from ve to ile hangi Component'ten hangi Component'e bilgi akacağı belirtilir. Ayrıca DSL aynı "http query parameter" gibi " ?noop=true" şeklinde ilave bilgiler de içerir
4. CamelContext.start() ile başlatılır
5. CamelContext.stop() ile durdurulur
DefaultCamelContext Sınıfı yazısına taşıdım
Hiç yorum yok:
Yorum Gönder