As described in Chapter 1, Spring Integration Overview, there are different types of Message Endpoint, such
as the Channel Adapter (inbound or outbound) and the Service Activator.
Spring Integration provides many other components that are also endpoints, such as Routers,
Splitters, and Aggregators. Each endpoint may provide its own specific metadata so that the
MessageBus
can manage its connection to channels and its poller (if necessary).
The scheduling metadata is provided as an implementation of the Schedule
interface.
This is an abstraction designed to allow extensibility of schedulers for messaging tasks. Currently, there are two
implementations: PollingSchedule
and CronSchedule
. The former has
a period property, and the latter has a cronExpression. The polling
schedule may be configured based on throughput expectations and/or the type of MessageSource
(e.g. file-system vs. JMS).
While the MessageBus manages the scheduling of the pollers, it is often beneficial to have multiple task
executors with different concurrency settings for an endpoint or group of endpoints. This provides more control
over the number of threads available for each receive-and-handle unit of work and depending on the type of
task executor, may also enable dynamic adjustments. When the MessageBus
activates an endpoint, it will create and schedule the poller for that endpoint based on the endpoint's
configuration. This will be described in more detail in Section 4.2.2, “Configuring Message Endpoints”.