Coder Social home page Coder Social logo

apache-camel-starter's Introduction

Simple app as an apache camel starter

This app shows how to setup a simple camel application with routes and processors. Examples for file and timer based integrations are available. The same application structure can be extended for more complex integrations.

Basics

  • Routing rules : A routing rule directs a message from source to target with intermediate processing. a typical syntax for the routing rule is as follows: from("SourceURL").process().to("TergetURL")

Consumers and Producers A local route starts with a consumer (from("SourceURL")) and typically ends with producer (to("TargetURL"))

  • Producers: Camel abstractions that refers to an entity capable of sending message to an endpoint
  • Consumers: Receives message produced by external system, wrpas them in an exchange and sends them downstream for processing
    • Event Driven Consumers: It is an async receiver that listens on a channel eg tcp/ip port, jms queue websocket etc.
    • Polling Consumers: sync receiver that actively goes and fetches messages from a particular source like ftp,

Exchange message The exchange object consists of the message that is propagated through the route. The main constituents of the exchange message are as follows:

  • In Message: The current message being processed by Camel. It consists of following components

    • Body
    • Headers
    • Attachments
  • Out Message:

    • Certain process nodes can treat In message as request and process/transform them.
    • This transformed message is then set as the Out message.
    • The old In message is discarded and the Out message is moved to the In message slot.
  • Message Exchange Patterns (MEP) effects the interaction between the exchanges and the endpoints.

    • Consumer Endpoint sets the initial value of the MEP. The initial value determines if the consumer enpoint expects a reply (InOut MEP) or not (InOnly MEP).
    • Producer Endpoint . The MEP affects the producer endpoints. For eg , if the current MEP is InOnly, then producer does not expect to recieve a reply from the endpoint.
  • Exchange properties a list of named properties containing metadata for the current message.

Message Exchange Patterns

  • InOnly
  • RobustInOnly
  • InOut
  • InOptinalOut
  • OutOnly
  • RobustOutOnly
  • OutIn
  • OutOptionalIn

** Processors ** ** Expressions and predicates **

Directory Structure

  • Application.java : Bootstrap application , add routes and lifecycle events. Services like tracing and logging drivers can be injected here
  • processors/ : Package to hold all message processors.
  • routes: Package to hold route builders
  • models: Package to hold any models/domain objects

apache-camel-starter's People

Contributors

prakharsrivastav avatar prakharsysco avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.