What is the difference between Gateway and Service Activator?

enterprise-integration, spring-integration

Solution

http://eaipatterns.com/

Typically, a service activator is used to invoke a local service, in such a manner that the service doesn't know it's being invoked from a messaging system.

A gateway s typically an entry or exit point for the messaging system.

Problem

What is the difference between Gateway and Service Activator as Message Endpoints (in terms of Enterprise Integration Patterns)?

Original source