[Camel Basics]

Define routes:

Either using Spring xml or Java DSL.

Spring xml:

<camelContext>

  <routeBuilder ref="myBuilder" />   //to load the Java DSL routes defined in MyRouteBuilder class

  <routeContextRef> //to load the routes in <routeContext> defined in other xml file

    <route> 

    <from> <process> <to>

  </route>

</....>

<bean id="myBuilder" class="org.apache.camel.spring.example.test1.MyRouteBuilder"/>

Java DSL:

extends RouteBuilder, implement the abstract method configure().

@Override
public void configure() throws Exception {

  Endpoint orderUpdates = endpoint("pubsub://batman-order-updates");
  from("pubsub://adv-updates").process(galaxyAdvCache.input(header(Ref.INBOX)));

}

asd

[Camel Basics],布布扣,bubuko.com

时间: 2024-08-08 17:45:48

[Camel Basics]的相关文章

Camel概念【Exchange 】

Exchange An exchange in Camel is the message's container during routing. (在camel中,exchange被当做路由交换的容器) An exchange also provides support for the various types of interactions between systems, also known as message exchange patterns ( MEP s).  MEP s ar

[Java Basics] Stack, Heap, Constructor

Good about Java: friendly syntax, memory management[GC can collect unreferenced memory resources], object-oriented features, portability. Stack Stores method invocations, local variables(include object reference, but the object itself is still stored

[每日一学]apache camel简介

apache camel 是轻量级esb框架.如下是它的架构图: 它有几个比较重要的概念就是: endpoint,所谓的endpoint,就是一种可以接收或发送数据的组件.可以支持多种协议,如jms,http,file等. 另一个重要的概念就是processor,它是用来处理具体业务逻辑的组件. 还有一个是:route,用来路由,指示数据从哪里来到哪里去,中间用哪个processor处理. 而processor之间用exchange对象来传送数据,有点像jms,通俗一点就像上学时传的小纸条,记住

Radio Basics for RFID

Radio Basics for RFID (2015/09/24 22:30:37) Radio Basics for RFID (2015/09/24 22:30:37) Radio Basics for RFID (2015/09/24 22:30:37) Radio Basics for RFID (2015/09/24 22:30:37) Radio Basics for RFID (2015/09/24 22:30:37) Radio Basics for RFID (2015/09

Basics of AngularJS

Basics of AngularJS: Part 1 By Gowtham Rajamanickam on Apr 09, 2015 AngularJS I have planned to start writing about AngularJS. I have begun to learn AngularJS a few months back, it's a great feature for website UI developers. It is also easy to learn

Camel概念【Architecture 】

1.4 Camel's architectureLet's now turn our attention to Camel's architecture. We'll first take a look at the high-level architecture and then drill down into the specific concepts. After you've read this section, you should be caught up on the integr

[DS Basics] List

1, LinkedList composed of one and one Node: [data][next]. [head] -> [data][next] -> [data][next] -> [data][next] -> [null]. Empty linkedList: head == null. V.S. Array DS: fast at insert/delete. [DS Basics] List,布布扣,bubuko.com

[DS Basics] Sorting

Time complexity: Binary search O(log2 n): i=0.   n elements:         ------------------- i=1.   n/2 elements:                   ---------- i=2.   n/4 elements:                          ----- ... i=i.    n/2^i elements:                        - 进行n/2^

[Java Basics] multi-threading

1, Interrupt Interruption in Java is not pre-emptive. Put another way both threads have to cooperate in order to process the interrupt properly. If the target thread does not poll the interrupted status the interrupt is effectively ignored. Polling o