What is the difference between Gateway and Service Activator as Message Endpoints (in terms of Enterprise Integration Patterns)?
The service activator is the endpoint type for connecting any Spring-managed object to an input channel so that it may play the role of a service. If the service produces output, it may also be connected to an output channel.
A gateway hides the messaging API provided by Spring Integration. It lets your application's business logic be unaware of the Spring Integration API. By using a generic Gateway, your code interacts with only a simple interface.
The gateway can either by synchronous (causing the application to block and wait for the SI system to respond) or asynchronous (allowing the application to do other work while a long running SI system processes).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With