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 are used to differentiate between one-way and request-response messaging styles. The Camel exchange holds a pattern property that can be either

(exchange还为不同种类的系统交互提供了支持,这也被称作消息交互模式,MEP用于区分单向和交互的信息请求,exchange有着这样的模式特性:)
InOnly —A one-way message (also known as an  Event message). For example,  JMS messaging is often one-way messaging.
InOut —A request-response message. For example,  HTTP -based transports are often request reply, where a client requests to retrieve a web page, waiting for the reply from the server.
Figure 1.5 illustrates the contents of an exchange in Camel.

Let’s look at the elements of figure 1.5 in more detail:
■ Exchange  ID —A unique  ID that identifies the exchange. Camel will generate a default unique  ID ,if you don’t explicitly set one.(Exchange  ID —唯一id标识exchange,如果不显式的设置id值,camel将自动生成默认id)
■MEP —A pattern that denotes whether you’re using the  InOnly or  InOut messaging style. When the pattern is  InOnly , the exchange contains an in message. For InOut , an out message also exists that contains the reply message for the caller.(记录InOnly或InOut的模式)
■ Exception—If an error occurs at any time during routing, an  Exception will be set in the exception field.
■ Properties—Similar to message headers(和message中的header很相似), but they last for the duration of the entire exchange. (但他在整个exchange过程中持续)Properties are used to contain global-level information(Properties用于存放全局信息), where as message headers are specific to a particular message. Camel itself will add various properties to the exchange during routing. You, as a developer, can store and retrieve properties at any point during the lifetime of an exchange.(在路由交换时,camel自身将向exchange中添加种类繁多的property,作为开发者的你,可以在exchange生命周期的任何时间点存取property)
■ In message—This is the input message, which is mandatory(必须有). The in message contains the request message.
■ Out message—This is an optional message that only exists if the  MEP is  InOut (当模式为Inout时,才有).The out message contains the reply message.

We discussed Camel’s message model before the architecture because we wanted you to have a solid understanding of what a message is in Camel. After all, the most important aspect of Camel is routing messages. You’re now well prepared to learn more about Camel and its architecture.

时间: 2024-10-15 02:32:43

Camel概念【Exchange 】的相关文章

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 bod

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

消息中间件——RabbitMQ(六)理解Exchange交换机核心概念!

前言 来了解RabbitMQ一个重要的概念:Exchange交换机 1. Exchange概念 Exchange:接收消息,并根据路由键转发消息所绑定的队列. 蓝色框:客户端发送消息至交换机,通过路由键路由至指定的队列. 黄色框:交换机和队列通过路由键有一个绑定的关系. 绿色框:消费端通过监听队列来接收消息. 2. 交换机属性 Name:交换机名称 Type:交换机类型--direct.topic.fanout.headers.sharding(此篇不讲) Durability:是否需要持久化,

RabbitMQ 核心概念及与 Spring Boot 2 的整合

RabbitMQ 简介 RabbitMQ 是什么 RabbitMQ 是一个用 Erlang 编写的开源的消息队列中间件,它实现了 AMQP 协议(其实还实现了 MTQQ 等消息协议).和其他两个主流的消息队列中间件 Kafka 和 RocketMQ 相比,拥有更低的延迟.更高的稳定性.更完备的功能.更完善的文档支持以及较活跃的开源社区支持,但是在吞吐量上和分布式扩展能力上逊色一些. AMQP 是什么 AMQP(Advanced Message Queuing Protocol),高级消息队列协议

大型网站架构之千万PV之RabbitMQ

简介 MQ全称为Message Queue, 消息队列(MQ)是一种应用程序对应用程序的通信方法.应用程序通过读写出入队列的消息(针对应用程序的数据)来通信,而无需专用连接来链接它们.消息传递指的是程序之间通过在消息中发送数据进行通信,而不是通过直接调用彼此来通信,直接调用通常是用于诸如远程过程调用的技术.排队指的是应用程序通过 队列来通信.队列的使用除去了接收和发送应用程序同时执行的要求.其中较为成熟的MQ产品有IBM WEBSPHERE MQ等等. 几个概念 Exchange:交换机,决定了

消息队列rabitMq

rabbitmq MQ全称为Message Queue, 消息队列(MQ)是一种应用程序对应用程序的通信方法.应用程序通过读写出入队列的消息(针对应用程序的数据)来通信,而无需专用连接来链接它们.消息传递指的是程序之间通过在消息中发送数据进行通信,而不是通过直接调用彼此来通信,直接调用通常是用于诸如远程过程调用的技术.排队指的是应用程序通过 队列来通信.队列的使用除去了接收和发送应用程序同时执行的要求. 使用场景 在项目中,将一些无需即时返回且耗时的操作提取出来,进行了异步处理,而这种异步处理的

Camel中的重要概念

Endpoint:即节点,即消息经过的地方 Camel支持的EndPoint 1.JMS队列 2.web service 3.文件 4.FTP服务 5.email地址 6.POJO 在基于Camel的应用中,你会创建一些EndPoint然后用路由将这些EndPoint连接起来.Camel定义了一个名这EndPoint的接口,每一个Camel支持的EndPoint都有一个类实现了该EndPoint接口,Camel提供了单独的Javadoc继承树为Camel支持的每一种通信技术. CamelCont

Exchange 2013 PowerShell关键概念之一

介绍 当你的组织决定升级到Exchange Server 2013,去体验一些新的功能,如集成的电子邮件存档.发现功能以及高可用功能.不管你是否喜欢,你应该意识到PowerShell已经是Exchange服务器管理工具的一部分,而且你需要去学习一些基本脚本知识,从而建立一些脚本管理Exchange Server.这本书就是关于这方面的介绍.在这一章,将介绍一些PowerShell的一些核心概念,这些概念讲方便你学习这本书中提到的一些实例知识.当然,假如你的PowerShell比较熟悉,可以跳过本