Spring Integration

Message Gateway

Vikas Verma
Message Gateway Introductions A gateway is an interface that provides two-way communication between APIs and endpoints. It provides a simple interface that interacts with the business logic. The API does not that it interacting with the spring integration. Type of Gateways Synchronous gateway In synchronous gateway, the sender thread suspended until a reply is received or a timeout happens. After spring integration 4.3, a new asynchronous gateway was added to the spring gateway.

Message channels and Adapters

Vikas Verma
Message Channel A message channel is use to transport the message from one messaging endpoint to another. It integrate the messaging endpoints. Message channel used to decouple the message producer and consumer. There are 3 interface provided for message - 1. Message Channel Interface It is the base interface they provide two methods to send the messages public interface MessageChannel { boolean send(Message message); boolean send(Message message, long timeout); } The return value true means message sent successful.

What are the Message Endpoints?

Vikas Verma
MessageEndpiont Message endpoints connect the application to the messaging framework in a non-invasive manner. The application would not have any idea or details of the message usage. Transformer A transformer will consume the message and transform the message into another message. The transformer can change the content or structure of the message. It can also change the header or remove the header information. Filter The message filter determines whether a message should be pass to an output channel or not.

What is Message, in Spring Integration

Vikas Verma
What is Message Message content the actual data and its metadata, that need to pass to other services. The message is having 2 parts Header The header contains the metadata about the message like Payload It contains the data that needs to pass in the message. It consists of a payload and headers. The payload is actual data of any type. The headers can contain information such as correlation Id, timestamp, and return address.