A message carries data through an integration flow. Components process it as it enters or leaves an application, and message channels connect those components like pipes. A flow can transform, split, aggregate, route, or process messages before they reach an exit point. section 10.0 section 10.4 section 10.2.1
The channel affects how a message moves:
- A PublishSubscribeChannel passes a published message to every consumer. section 10.2.1
- A QueueChannel holds messages until consumers pull them; each message goes to one consumer. section 10.2.1
- A DirectChannel invokes one consumer in the sender’s thread. It is the default input channel in Java configuration and the Java DSL. section 10.2.1
An order moving between components
An order can be sent as a message and received by another component. With JMS, JmsTemplate can convert an order object into a Message before sending it; a receiver can obtain the raw Message or have it converted back to an order. These are JMS examples of the broader idea of carrying application data in a message, not a claim that every messaging API uses the same Message type. section 9.1.2 section 9.1.3
@Bean
public IntegrationFlow orderFlow() {
return IntegrationFlows
...
.channel("orderChannel")
...
.get();
}
The Java DSL flow names orderChannel as a point through which messages pass; a different channel implementation can be declared as a bean when the default DirectChannel is not wanted. section 10.2.1
A message can carry more than its application data. For example, channel behavior can depend on a priority header; a Kafka listener can access a message’s payload and headers when it needs metadata as well as the order itself. section 10.2.1 section 9.3.3






