Intercepting Messages on TCP/IP in Mule

mule jenkins

In this article, we will see how Mule can intercept messages on the TCP/IP socket for real-time communication. You will first receive messages on the TCP/IP socket and then transform the messages from byte to object, then from object to XML, and then, finally, from XML to JSON––all using out-of-the-box Mule transformers.

The TCP transport allows users to send or receive messages over TCP connections. TCP is a layer above the IP.

Polling TCP client connector

motif

Right now TCP inbound endpoints are implemented as TCP servers that listen for data coming from different clients. In Mule ESB 2.2.6 we are adding a new feature to inverse the control: TCP inbounds can now poll data from remote servers.

It is really easy to switch to this strategy. Let’s take a look of how a mule configuration looks like: