socketstcptcpclientmulesoftmule-connector

Sockets Connector - is there any way to read data instead of send and receive - Mule 4


There is a requirement.

We have to connect to tcp server. We are acting as a client. Will initiate a logon massage to tcp server. After successful logon they going to push data to that tcp server. So here we have to read that data posted on particular server. and to maintain the connection we need respond back to their echo massages.

But the problem is mulesoft we have the send and receive connector. So after 1 call thread is getting killed. Here need a solution that it has to read in case new message in that particular tcp socket.

Note: will not able to use the socket listener here because we are not exposing any socket packet here. we are not acting as server.


Solution

  • MuleSoft Sockets Connector for Mule 4 does not support persistent connections. As an alternative you could create your own connector in Java code with the Mule SDK to support this use case.