Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Integration Gateway with no arguments

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.
like image 535
John Oxley Avatar asked Mar 20 '12 15:03

John Oxley


1 Answers

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.

like image 52
Gary Russell Avatar answered Sep 24 '22 00:09

Gary Russell