Camel In Action 读书笔记 (1)

<h2 align="center">Camel’s message model --- Camel的消息模型</h2> <p>&#160;&#160;&#160;&#160; Camel中的有两种抽象的消息类型:</p> <p>&#160;&#160;&#160;&#160;&#160;&#160; org.apache.camel.Message----是消息的基本的实体。</p> <p>&#160;&#160;&#160;&#160;&#160; org.apache.camel.Exchange---描述消息的一次交换。exchange包含一条流入(in)的Message,如果有应答则还有一条流出(out)的Message.</p> <h3>&#160;&#160; Message</h3> <blockquote> <p>message有三部分组成:body(有效负载)、headers、Attachments ;mesage有一个全局唯一标示(identifier),类型为(java.lang.String).</p> </blockquote> <p><a href="http://static.oschina.net/uploads/img/201305/31145347_C6q2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://static.oschina.net/uploads/img/201305/31145347_QaZ8.png" width="172" height="244" /></a> </p> <p>&#160;</p> <h4>HEADERS AND ATTACHMENTS</h4> <p>Headers放的是消息相关的信息,比如消息发送者(sender),消息编码(encode),验证信息….</p> <p>Headers通过key-value的形式存储数据。key是String型,value是Object型。</p> <p>消息也可以包含附件常用在web service 和 email的路由中。</p> <h4>BODY</h4> <p>body是Object型可以用来存放任何数据。</p> <h4>FAULT FLAG</h4> <p>有部分协议如(WSDL,JBI)区分输出(output)与错误消息。</p> <h3> Exchange</h3> <p>exchange包含如下图所示:</p> <p><a href="http://static.oschina.net/uploads/img/201305/31145348_UBT3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://static.oschina.net/uploads/img/201305/31145348_xWA5.png" width="223" height="244" /></a> </p> <p>MEP用来区分交互类型:</p> <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; InOnly代表单向模式(one way),比如JMS</p> <p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; InOut代表还应答模式(request-response).比如HTTP</p>

转载于:https://my.oschina.net/u/574870/blog/134805

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
中文名: Camel 实战 原名: Camel in Action 作者: Claus Ibsen Jonathan Anstey 资源格式: PDF 版本: 英文文字版/更新源代码 出版社: Manning书号: 9781935182368发行时间: 2010年12月 地区: 美国 语言: 英文 简介: 内容介绍: Apache Camel is a Java framework that lets you implement the standard enterprise integration patterns in a few lines of code. With a concise but sophisticated DSL you snap integration logic into your app, Lego-style, using Java, XML, or Scala. Camel supports over 80 common transports such as HTTP, REST, JMS, and Web Services. Camel in Action is a Camel tutorial full of small examples showing how to work with the integration patterns. It starts with core concepts like sending, receiving, routing, and transforming data. It then shows you the entire lifecycle and goes in depth on how to test, deal with errors, scale, deploy, and even monitor your app—details you can find only in the Camel code itself. Written by the developers of Camel, this book distills their experience and practical insights so that you can tackle integration tasks like a pro. 目录: Part 1 First steps 1 Meeting Camel 2 Routing with Camel Part 2 Core Camel 3 Transforming data with Camel 4 Using beans with Camel 5 Error handling 6 Testing with Camel 7 Understanding components 8 Enterprise integration patterns Part 3 Out in the wild 9 Using transactions 10 Concurrency and scalability 11 Developing Camel projects 12 Management and monitoring 13 Running and deploying Camel 14 Bean routing and remoting appendix A Simple, the expression language appendix B Expressions and predicates appendix C The producer and consumer templates appendix D The Camel community appendix E Akka and Camel
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值