Skip to content

Commit

Permalink
Fix producer for outputChannel
Browse files Browse the repository at this point in the history
Current async version of the `KinesisMessageHandler` is request-reply.
The binder deals with it as a one-way, so no need in reply.

* Add `messageHandler.setOutputChannel(new NullChannel())` for the producer
  • Loading branch information
artembilan committed Apr 5, 2023
1 parent fcfc770 commit 8223c8d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
import org.springframework.integration.aws.outbound.AbstractAwsMessageHandler;
import org.springframework.integration.aws.outbound.KinesisMessageHandler;
import org.springframework.integration.aws.outbound.KplMessageHandler;
import org.springframework.integration.channel.NullChannel;
import org.springframework.integration.core.MessageProducer;
import org.springframework.integration.endpoint.MessageProducerSupport;
import org.springframework.integration.expression.ExpressionUtils;
Expand Down Expand Up @@ -230,6 +231,7 @@ protected MessageHandler createProducerMessageHandler(ProducerDestination destin
messageHandler.setAsync(!producerProperties.getExtension().isSync());
messageHandler.setSendTimeout(producerProperties.getExtension().getSendTimeout());
messageHandler.setBeanFactory(getBeanFactory());
messageHandler.setOutputChannel(new NullChannel());

if (errorChannel != null) {
((InterceptableChannel) channel)
Expand Down

0 comments on commit 8223c8d

Please sign in to comment.