Skip to content

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

Open
@Syrou

Description

@Syrou

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?

Activity

garyrussell

garyrussell commented on Sep 18, 2020

@garyrussell
Contributor

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

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

FOO
FOO
Syrou

Syrou commented on Sep 23, 2020

@Syrou
Author

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @garyrussell@Syrou

        Issue actions

          What is required to make DynamicTcpClientApplication also return data with the send interface? · Issue #289 · spring-projects/spring-integration-samples