Spring implementation of channels
Spring Integration defines a top-level interface for the message channel that should be implemented by any of the concrete channel implementations, as shown here:
public interface MessageChannel { boolean send(Message<?> message); boolean send(Message<?> message, long timeout); }
The
MessageChannel
interface defines two versions of the send
method—one which accepts only Message
as an argument while the other one accepts an additional parameter (timeout
). The send
method returns true if the message is sent out successfully; otherwise, if it times out or the sending fails for some reason, it returns false.
Further, Spring Integration provides a sub type of the MessageChannel
interface to support two types of channels: PollableChannel
and SubscribableChannel
. This is explained in more detail in the following points:
- Pollable channel: This channel provides the interface that has two versions of receive, one which does not take any argument...