spring-projects / spring-projects/spring-integration-samples

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

Open
#289 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-reporter
Dominant language
Java
Stars
2.4k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the DynamicTcpClientApplication sample and the ToTCP MessagingGateway interface shown in the issue. Trace how the TCP request and response are connected, then determine what request-reply behavior is required so the interface can return response data rather than void; the work is done when that behavior is demonstrated in the sample.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.