I would like to ask, why amqp / jms is implemented as Inbound and Outbound Channel Adapters
.
They role is same as Message Channel
, so if they would be implemented as MessageChannel, then it could be easily used in different components e.g. directly in service activator:
<integration:service-activator ref="receiver" method="receiveMessage" input-channel="jmsInputChannel"/>
Where during creation of service activator, it would be mapped to some message listener, that will be called by JMS/AMQP system.
Configuration would be done directly on JMSMessageChannel
.
Is there something I missing? Because on high level it does look possible to be done and would simplifiy API.
Looks like you are missing the fact that Spring Integration AMQP and JMS really have particular MesaageChannel implementations
https://docs.spring.io/spring-integration/docs/5.0.0.RELEASE/reference/html/amqp.html#amqp-channels
https://docs.spring.io/spring-integration/docs/5.0.0.RELEASE/reference/html/jms.html#jms-channel