In Camel, there are two abstractions for modeling messages, both of which we’ll cover
in this section.
■ org.apache.camel.Message—The fundamental entity containing the data
being carried and routed in Camel
■ org.apache.camel.Exchange—The Camel abstraction for an exchange of messages. This exchange of messages has an “in” message and as a reply, an “out”
message
We’ll start by looking at Message to understand how data is modeled and carried in
Camel. Then we’ll look at how a “conversation” is modeled in Camel by the Exchange.
在Camel中,有两种用于建模消息的抽象,我们将介绍这两种抽象
在本节中。
■ org.apache.camel.Message.消息包含数据的基本实体
■ org.apache.camel.Exchange. Camel用来交换数据的抽象。此消息交换有一个“in”消息,作为答复,还有一个“out”消息
我们将从查看消息开始,以了解数据是如何建模和携带进来的。然后,我们将看看交换如何在Camel中对“对话”进行建模。