Spring Integration Tutorial (Part 7) – Service Activators
As we near the end of this eight-part tutorial series on Spring Integration (SI), the topic of this seventh installment is on service activators. The name of this SI message endpoint aptly defines what it does. A service activator is an SI component that triggers (or activates) a Spring-managed service object or bean. A service activator polls a message channel looking for messages. On the arrival of a message, it calls the processing method of the service bean (which is typically just a POJO).
The service’s processing method is passed the message or the payload of the message based on the parameter type to the processing method. In fact, the service’s processing method can be passed no data. In which case, the service activator is considered an event-style component that triggers processing just on the mere arrival of the message. However, the processing method often uses the message data (its payload or header information) to perform work. The service’s processing method may also optionally return a value or message. The output, when returned, can be sent to an SI output channel.
Watch the short presentation for more information on service activators below.
View Slides Only
Once done with the video session, get some hands on experience through Lab 7.
Missed other parts of the tutorial series? Check them out using the links below.