Reply client base on session id

#1

How to reply client base on client session id after the request payload go through few nodes??
I need some example flow nodes?

0 Likes

#2

That's a very general question -- it would help to see the relevant part of your flow...

Is this flow starting with an http in node? If so, just make sure that you end the flow with an http response node, and that you do not remove or modify the original msg.res field along the way.

0 Likes

#3

I'm using tcp in and out. Above are the flow.

0 Likes

#4

I already found my solution.

No matter what value you are going to reply to the client, just reply with "msg.payload", do not reply with any other massage when you build socket connection flow, Example for newbie:

DON'T : msg1.payload or _ipadd.payload or any other var with .payload

DO : msg.payload

1 Like

#5

Makes sense -- and probably for a similar reason as an http flow. Likely, there a client id field on the original msg object that needs to stay intact throughout the flow, so the tcp out node can know which client to respond to. If you put a debug node set to show the full msg object after the tcp in node, you can see how it works...

0 Likes