TcpReceivingChannelAdapter vs TcpSendingMessageHandler
Asked Answered
D

1

0

Why channel can be set on TcpReceivingChannelAdapter, the inbound adapter, but not on TcpSendingMessageHandler, the outbound adapter?

Why outbound adapter is called TcpSendingMessageHandler, why handler, not adapter?

One would intuitively expects that inbound adapter and outbound adapter would be "mirrors" of each other, just with different directions.

My question is variation of Spring Integration - Inbound vs Outbound Channel Adapters question, but focused on Spring Integration DSL API and Tcp/Ip socket communication.

Danielladanielle answered 14/3, 2019 at 13:17 Comment(0)
F
1

Consuming endpoints (service activator, outbound channel adapter, outbound gateway etc). Consist of two beans, a Consumer (type depends on the channel type) and a message handler.

The channel goes on the consumer which calls the handler when it gets a message.

When using java configuration, the @ServiceActivator annotation triggers the creation of the consumer bean.

If you don't want to use annotations, add a ConsumerEndpointFactoryBean to create the consumer (injecting the handler bean).

Fulvi answered 14/3, 2019 at 13:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.