假设以下流程:
public IntegrationFlow sendFlow() {
return IntegrationFlow.from(inputChannel())
.handle("something","someMethod")
.channel(outputChannel())
.get();
}
如何手动将消息放入输入通道?
我想要这样的东西:
Message<String> message = MessageBuilder.withPayload("Test).build();
Something.submitToChannel("outputChannel", message);
注意:我从 Web 端点调用此函数。
谢谢
类似:
@Autowire
MessageChannel inputChannel;
...
Message<String> message = MessageBuilder.withPayload("Test").build();
this.inputChannel.send(message);