Spring Integration Gateway with no arguments

老子叫甜甜 提交于 2021-02-08 13:34:05

问题


On my gateway, I have a method

@Gateway
String commsTest();

The idea is that I can call commsTest from the bean and use spring integration to wire it up to the service activator that will check comms.

When I do that I get a receive is not supported, because no pollable reply channel has been configured error. I realise that this is because a method with no params means "I am trying to poll a message from the channel"

This is a two part question.

  1. What does it mean to poll a message from the channel.
  2. How can I get the functionality I want.

回答1:


Spring Integration currently has no concept of a message without a payload. By default, a gateway method with no arguments implies you want to receive data (rather than sending data or sending and receiving data).

You can change that default behavior, as described in the reference documentation.



来源:https://stackoverflow.com/questions/9790323/spring-integration-gateway-with-no-arguments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!