Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is required to make DynamicTcpClientApplication also return data with the send interface? #289

Open
Syrou opened this issue Sep 18, 2020 · 2 comments

Comments

@Syrou
Copy link

Syrou commented Sep 18, 2020

I'm trying to wrap my head around how to make the DynamicTcpClientApplication also give back the response data sent with:

	@MessagingGateway(defaultRequestChannel = "toTcp.input")
	public interface ToTCP {

		public void send(String data, @Header("host") String host, @Header("port") int port);

	}

Just changing from void to byte[] is not enough. What is needed to make sure a client can get the response from a tcp request back through the interface?

@garyrussell
Copy link
Contributor

garyrussell commented Sep 18, 2020

Use gateways instead of channel adapters - see this commit garyrussell@901363d

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::       (v2.4.0-SNAPSHOT)

FOO
FOO

@Syrou
Copy link
Author

Syrou commented Sep 23, 2020

Thanks, i'll be giving this a go in a week, i'll be getting back asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants