camel概念【Message】

此为message的功能

Messages are the entities used by systems to communicate with each other when using

messaging channels.

Messages flow inone direction from a sender to a receiver(message的功能), as illustrated in figure 1.3.

此为message的结构

Messages have a body (a payload),headers, and optional attachments, as illustrated in figure 1.4.

此为message的特点

1)Messages are uniquely identified with an identifier of type java.lang.String .

2)The identifier’s uniqueness is enforced and guaranteed by the message creator,

3)It’s protocol dependent, and it doesn’t have a guaranteed format.

4) For protocols that don’t define a unique message identification scheme, Camel uses its own  UID generator.

HEADERS AND ATTACHMENTS

Headers are values associated with the message, such as sender identifiers, hints about content encoding,authentication information, and so on. (header与Message相关联的值有:发送者的标识符、内容编码提示、认证信息等)

Headers are name-value pairs; the name is a unique, case-insensitive string, and the value is of type  java.lang.Object .(headers 是键值对的组合,键(name)是不区分大小写的唯一字串,值(value)是java对象)

This means that Camel imposes no constraints on the type of the headers. (header的类型是没有限制的)

Headers are stored as a map within the message.(header作为map存储)

A message can also have optional attachments(附件), which are typically used for the web service and email components.

BODY

The body is of type  java.lang.Object . That means that a message can store any kind of content. (body也是一种java对象,这意味着message可以以任何形式储存)

It also means that it’s up to the application designer to make sure that the receiver can understand the content of the message. When the sender and receiveruse different body formats, Camel provides a number of mechanisms to transform the data into an acceptable format, and in many cases the conversion happens automati-cally with type converters, behind the scenes.(这也意味着,应用设计者要确保当传送方以不同格式传送message时,接收方可以理解message的内容,camel给出了很多传输转换机制确保数据是可接受的格式,在很多条件下,转换机制将在框架内部实现自动转换)

FAULT FLAG

Messages also have a fault flag. Some protocols and specifications, such as  WSDL and

JBI , distinguish between output and fault messages. They’re both valid responses to

invoking an operation, but the latter indicates an unsuccessful outcome. In general,

faults aren’t handled by the integration infrastructure. They’re part of the contract

between the client and the server and are handled at the application level.(注意错误的级别)

During routing, messages are contained in an exchange.(messages 包含在Exchange当中)

时间: 2024-08-09 21:53:34

camel概念【Message】的相关文章

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

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

Camel概念【JMS】

JMS (Java Message Service) JMS (Java Message Service) is a Java API that allows you to create, send, receive, and read messages. It also mandates that messaging is asynchronous and has specific elements of reliability, like guaranteed and once-and-on

Camel FTP error:File operation failed: 150 Here comes the directory listing

问题:写了一个Camel的FTP传输程序,在本地Win7和Ubuntu下运行都正常,但是在Redhat中报"File operation failed: 150 Here comes the directory listing"异常 解决方法: 首先贴出修改前的代码以及错误,如下: 代码: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.s

SOA系统架构

一.SOA原理与应用 1.SOA原理 SOA(Service-oriented architecture,面向服务架构). SOA的价值在于跨越了不同应用系统.不同技术的整合,这种整合改变现有的商业模型. SOA是在计算环境下设计.开发.应用.管理分散的逻辑(服务)单元的一种规范.这个定义决定了SOA的广泛性.SOA要求开发者从服务集成的角度来设计应用软件,即使这么做的利益不会马上显现.SOA要求开发者超越应用软件来思考,并考虑复用现有的服务,或者检查如何让服务被重复利用.SOA鼓励使用可替代的

Handler运行机制

Handler的运行机制 Handler的作用: 当我们需要在子线程处理耗时的操作(例如访问网络,数据库的操作),而当耗时的操作完成后,需要更新UI,这就需要使用Handler来处理,因为子线程不能做更新UI的操作.Handler能帮我们很容易的把任务(在子线程处理)切换回它所在的线程.简单理解,Handler就是解决线程和线程之间的通信的. Handler的使用 使用的handler的两种形式: 1.在主线程使用handler: 2.在子线程使用handler. 在主线程使用handler的示

RabbitMQ简介

RabbitMQ特点 RabbitMQ 是一个由 Erlang 语言开发的 AMQP 的开源实现. AMQP :Advanced Message Queue,高级消息队列协议.它是应用层协议的一个开放标准,为面向消息的中间件设计,基于此协议的客户端与消息中间件可传递消息,并不受产品.开发语言等条件的限制.RabbitMQ 最初起源于金融系统,用于在分布式系统中存储转发消息,在易用性.扩展性.高可用性等方面表现不俗.具体特点包括: 可靠性(Reliability) RabbitMQ 使用一些机制来

springboot核心技术(五)-----消息(rabbitmq)

消息 1. 大多应用中,可通过消息服务中间件来提升系统异步通信.扩展解耦能力 2. 消息服务中两个重要概念: 消息代理(message broker)和目的地(destination) 当消息发送者发送消息以后,将由消息代理接管,消息代理保证消息传递到指定目 的地. 3. 消息队列主要有两种形式的目的地 1. 队列(queue):点对点消息通信(point-to-point) 2. 主题(topic):发布(publish)/订阅(subscribe)消息通信 异步处理 1.同步处理方式 2.多

Spring Boot 2.X - Spring Boot整合AMQP之RabbitMQ

文章目录Spring Boot 2.X - Spring Boot整合AMQP之RabbitMQRabbitMQ简介引入依赖编写配置编写接口启用Rabbit注解消息监听消息测试Spring Boot 2.X - Spring Boot整合AMQP之RabbitMQSpring Boot 2 整合RabbitMQ案例. RabbitMQ简介简介RabbitMQ是一个由erlang开发的AMQP(Advanved Message Queue Protocol)的开源实现.核心概念Message消息,